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(cachedCall);
|
||||||
PREP(canGetInPosition);
|
PREP(canGetInPosition);
|
||||||
PREP(canInteractWith);
|
PREP(canInteractWith);
|
||||||
PREP(canUseWeapon);
|
|
||||||
PREP(changeProjectileDirection);
|
PREP(changeProjectileDirection);
|
||||||
PREP(checkFiles);
|
PREP(checkFiles);
|
||||||
PREP(checkPBOs);
|
PREP(checkPBOs);
|
||||||
@ -293,6 +292,9 @@ PREP(hashListSelect);
|
|||||||
PREP(hashListSet);
|
PREP(hashListSet);
|
||||||
PREP(hashListPush);
|
PREP(hashListPush);
|
||||||
|
|
||||||
|
// backwards comp
|
||||||
|
DFUNC(canUseWeapon) = CBA_fnc_canUseWeapon;
|
||||||
|
|
||||||
GVAR(syncedEvents) = HASH_CREATE;
|
GVAR(syncedEvents) = HASH_CREATE;
|
||||||
GVAR(showHudHash) = [] call FUNC(hashCreate);
|
GVAR(showHudHash) = [] call FUNC(hashCreate);
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};
|
if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[] call FUNC(nextMode);
|
[] call FUNC(nextMode);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// 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);
|
[ACE_player, currentWeapon ACE_player] call FUNC(switchLaserLightMode);
|
||||||
true
|
true
|
||||||
|
@ -22,7 +22,7 @@ GVAR(cacheWeaponData) setText QGVAR(cacheWeaponData);
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// 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), []])}
|
{currentWeapon ACE_player in (ACE_player getVariable [QGVAR(jammedWeapons), []])}
|
||||||
) exitWith {false};
|
) exitWith {false};
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ GVAR(knowAboutJam) = false;
|
|||||||
if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then {
|
if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then {
|
||||||
|
|
||||||
private _condition = {
|
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 [QGVAR(jammedWeapons), []])}
|
||||||
&& {!(currentMuzzle (_this select 1) in ((_this select 1) getVariable [QEGVAR(safemode,safedWeapons), []]))}
|
&& {!(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"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
@ -9,7 +9,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, vehicle ACE_player, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// 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
|
// Statement
|
||||||
[ACE_player] call FUNC(checkAmmo);
|
[ACE_player] call FUNC(checkAmmo);
|
||||||
|
@ -13,7 +13,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// 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
|
// Statement
|
||||||
[ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety);
|
[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 setVariable [QGVAR(actionID), [
|
||||||
_unit, "DefaultAction", {
|
_unit, "DefaultAction", {
|
||||||
if (
|
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 (currentMuzzle (_this select 1) in ((_this select 1) getVariable [QGVAR(safedWeapons), []])) then {
|
||||||
if (inputAction "nextWeapon" > 0) exitWith {
|
if (inputAction "nextWeapon" > 0) exitWith {
|
||||||
|
@ -8,7 +8,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, handgunWeapon ACE_player] call FUNC(selectWeaponMode);
|
[ACE_player, handgunWeapon ACE_player] call FUNC(selectWeaponMode);
|
||||||
@ -21,7 +21,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
||||||
@ -34,7 +34,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMuzzle);
|
[ACE_player, primaryWeapon ACE_player] call FUNC(selectWeaponMuzzle);
|
||||||
@ -47,7 +47,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, secondaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
[ACE_player, secondaryWeapon ACE_player] call FUNC(selectWeaponMode);
|
||||||
@ -60,7 +60,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, binocular ACE_player] call FUNC(selectWeaponMode);
|
[ACE_player, binocular ACE_player] call FUNC(selectWeaponMode);
|
||||||
@ -73,7 +73,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, 1] call FUNC(selectNextGrenade);
|
[ACE_player, 1] call FUNC(selectNextGrenade);
|
||||||
@ -86,7 +86,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
[ACE_player, 2] call FUNC(selectNextGrenade);
|
[ACE_player, 2] call FUNC(selectNextGrenade);
|
||||||
@ -99,7 +99,7 @@ if (!hasInterface) exitWith {};
|
|||||||
// Conditions: canInteract
|
// Conditions: canInteract
|
||||||
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
if !([ACE_player, ACE_player, ["isNotInside", "isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !([ACE_player] call EFUNC(common,canUseWeapon)) exitWith {false};
|
if !([ACE_player] call CBA_fnc_canUseWeapon) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
if ((currentWeapon ACE_player) != "") then {
|
if ((currentWeapon ACE_player) != "") then {
|
||||||
|
Loading…
Reference in New Issue
Block a user