ACE3/addons/hearing/initKeybinds.inc.sqf

16 lines
689 B
Plaintext
Raw Normal View History

["ACE3 Equipment", QGVAR(putOrRemoveEarplugs), LLSTRING(PutOrRemoveEarplugs), {
// Conditions: specific
if !([ACE_player, objNull, ["isNotSwimming", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false};
if (GVAR(EnableCombatDeafness) && {!([ACE_player] call FUNC(hasEarPlugsIn))} && {[ACE_player, "ACE_EarPlugs"] call EFUNC(common,hasItem)}) exitWith {
[ACE_player, true] call FUNC(putInEarPlugs);
true
};
if (GVAR(EnableCombatDeafness) && {[ACE_player] call FUNC(hasEarPlugsIn)}) exitWith {
[ACE_player, true] call FUNC(removeEarPlugs);
true
};
false
}] call CBA_fnc_addKeybind; // UNBOUND