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:
parent
19d5fa0a4e
commit
9d128152a3
@ -5,7 +5,7 @@ class CfgVehicles {
|
||||
class ACE_Equipment {
|
||||
class ACE_PutInEarplugs {
|
||||
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"};
|
||||
statement = QUOTE( [_player] call FUNC(putInEarPlugs) );
|
||||
showDisabled = 0;
|
||||
@ -14,7 +14,7 @@ class CfgVehicles {
|
||||
};
|
||||
class ACE_RemoveEarplugs {
|
||||
displayName = CSTRING(EarPlugs_Off);
|
||||
condition = QUOTE( [_player] call FUNC(hasEarPlugsIn) );
|
||||
condition = QUOTE( GVAR(EnableCombatDeafness) && {[_player] call FUNC(hasEarPlugsIn)});
|
||||
exceptions[] = {"isNotInside", "isNotSitting"};
|
||||
statement = QUOTE( [_player] call FUNC(removeEarPlugs) );
|
||||
showDisabled = 0;
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
params ["_player"];
|
||||
|
||||
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||
|
||||
// Plugs in inventory, putting them in
|
||||
_player removeItem "ACE_EarPlugs";
|
||||
|
||||
|
@ -17,6 +17,8 @@
|
||||
|
||||
params ["_player"];
|
||||
|
||||
if (!GVAR(EnableCombatDeafness)) exitWith {};
|
||||
|
||||
if !(_player canAdd "ACE_EarPlugs") exitWith { // inventory full
|
||||
[localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user