relace ace_common_fnc_canUseWeapon with CBA_fnc_canUseWeapon

This commit is contained in:
commy2 2016-02-20 22:41:24 +01:00
parent 0021bc08df
commit 73d5b3c77b
9 changed files with 19 additions and 17 deletions

View File

@ -16,7 +16,6 @@ PREP(blurScreen);
PREP(cachedCall);
PREP(canGetInPosition);
PREP(canInteractWith);
PREP(canUseWeapon);
PREP(changeProjectileDirection);
PREP(checkFiles);
PREP(checkPBOs);
@ -293,6 +292,9 @@ PREP(hashListSelect);
PREP(hashListSet);
PREP(hashListPush);
// backwards comp
DFUNC(canUseWeapon) = CBA_fnc_canUseWeapon;
GVAR(syncedEvents) = HASH_CREATE;
GVAR(showHudHash) = [] call FUNC(hashCreate);

View File

@ -15,7 +15,7 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
// Statement
[] call FUNC(nextMode);

View File

@ -5,7 +5,7 @@
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
[ACE_player, currentWeapon ACE_player] call FUNC(switchLaserLightMode);
true

View File

@ -22,7 +22,7 @@ GVAR(cacheWeaponData) setText QGVAR(cacheWeaponData);
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon) &&
if !([ACE_player] call CBA_fnc_canUseWeapon &&
{currentWeapon ACE_player in (ACE_player getVariable [QGVAR(jammedWeapons), []])}
) exitWith {false};

View File

@ -46,7 +46,7 @@ GVAR(knowAboutJam) = false;
if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then {
private _condition = {
[_this select 1] call EFUNC(common,canUseWeapon)
[_this select 1] call CBA_fnc_canUseWeapon
&& {currentMuzzle (_this select 1) in ((_this select 1) getVariable [QGVAR(jammedWeapons), []])}
&& {!(currentMuzzle (_this select 1) in ((_this select 1) getVariable [QEGVAR(safemode,safedWeapons), []]))}
};

View File

@ -1,4 +1,4 @@
// by esteldunedain
s// by esteldunedain
#include "script_component.hpp"
if (!hasInterface) exitWith {};
@ -9,7 +9,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !(ACE_player call EFUNC(common,canUseWeapon) || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false};
if !(ACE_player call CBA_fnc_canUseWeapon || {(vehicle ACE_player) isKindOf "StaticWeapon"}) exitWith {false};
// Statement
[ACE_player] call FUNC(checkAmmo);

View File

@ -13,7 +13,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon) && {currentWeapon ACE_player != binocular ACE_player}) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon && {currentWeapon ACE_player != binocular ACE_player}) exitWith {false};
// Statement
[ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety);

View File

@ -38,7 +38,7 @@ if (_unit getVariable [QGVAR(actionID), -1] == -1) then {
_unit setVariable [QGVAR(actionID), [
_unit, "DefaultAction", {
if (
[_this select 1] call EFUNC(common,canUseWeapon)
[_this select 1] call CBA_fnc_canUseWeapon
&& {
if (currentMuzzle (_this select 1) in ((_this select 1) getVariable [QGVAR(safedWeapons), []])) then {
if (inputAction "nextWeapon" > 0) exitWith {

View File

@ -8,7 +8,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
// Statement
[ACE_player, handgunWeapon ACE_player] call FUNC(selectWeaponMode);
@ -21,7 +21,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
// Statement
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMode);
@ -34,7 +34,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
// Statement
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMuzzle);
@ -47,7 +47,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
// Statement
[ACE_player, secondaryWeapon ACE_player] call FUNC(selectWeaponMode);
@ -60,7 +60,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
// Statement
[ACE_player, binocular ACE_player] call FUNC(selectWeaponMode);
@ -73,7 +73,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
// Statement
[ACE_player, 1] call FUNC(selectNextGrenade);
@ -86,7 +86,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
// Statement
[ACE_player, 2] call FUNC(selectNextGrenade);
@ -99,7 +99,7 @@ if (!hasInterface) exitWith {};
// Conditions: canInteract
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
// Statement
if ((currentWeapon ACE_player) != "") then {