mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
relace ace_common_fnc_canUseWeapon with CBA_fnc_canUseWeapon
This commit is contained in:
parent
0021bc08df
commit
73d5b3c77b
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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};
|
||||
|
||||
|
@ -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), []]))}
|
||||
};
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user