mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Hide earplug actions if setting disabled (#4913)
* Hide earplug actions if setting disabled * Add lines that are new
This commit is contained in:
@ -5,7 +5,7 @@ class CfgVehicles {
|
|||||||
class ACE_Equipment {
|
class ACE_Equipment {
|
||||||
class ACE_PutInEarplugs {
|
class ACE_PutInEarplugs {
|
||||||
displayName = CSTRING(EarPlugs_On);
|
displayName = CSTRING(EarPlugs_On);
|
||||||
condition = QUOTE( !([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player} );
|
condition = QUOTE(GVAR(EnableCombatDeafness) && {!([_player] call FUNC(hasEarPlugsIn)) && {'ACE_EarPlugs' in items _player}});
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE( [_player] call FUNC(putInEarPlugs) );
|
statement = QUOTE( [_player] call FUNC(putInEarPlugs) );
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
@ -14,7 +14,7 @@ class CfgVehicles {
|
|||||||
};
|
};
|
||||||
class ACE_RemoveEarplugs {
|
class ACE_RemoveEarplugs {
|
||||||
displayName = CSTRING(EarPlugs_Off);
|
displayName = CSTRING(EarPlugs_Off);
|
||||||
condition = QUOTE( [_player] call FUNC(hasEarPlugsIn) );
|
condition = QUOTE( GVAR(EnableCombatDeafness) && {[_player] call FUNC(hasEarPlugsIn)});
|
||||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||||
statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
|
statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
|
||||||
showDisabled = 0;
|
showDisabled = 0;
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
params ["_player"];
|
params ["_player"];
|
||||||
|
|
||||||
|
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||||
|
|
||||||
// Plugs in inventory, putting them in
|
// Plugs in inventory, putting them in
|
||||||
_player removeItem "ACE_EarPlugs";
|
_player removeItem "ACE_EarPlugs";
|
||||||
|
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
|
|
||||||
params ["_player"];
|
params ["_player"];
|
||||||
|
|
||||||
|
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||||
|
|
||||||
if !(_player canAdd "ACE_EarPlugs") exitWith { // inventory full
|
if !(_player canAdd "ACE_EarPlugs") exitWith { // inventory full
|
||||||
[localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured);
|
[localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user