mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Hearing - Keybind for putting or taking out earplugs (#9804)
* Added keybind put or take out earplugs * Update addons/hearing/XEH_postInit.sqf Don't need to register keybinds on machines that don't have interfaces. Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/hearing/initKeybinds.inc.sqf Removed default keybind, added new line at the end of the file and changed some code formatting, as well as some functions: Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> * Update addons/hearing/stringtable.xml Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> --------- Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
parent
bfbfc66d1c
commit
8a67744cd4
@ -2,6 +2,8 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
#include "initKeybinds.inc.sqf"
|
||||
|
||||
GVAR(cacheAmmoLoudness) = call CBA_fnc_createNamespace;
|
||||
|
||||
GVAR(deafnessDV) = 0;
|
||||
|
15
addons/hearing/initKeybinds.inc.sqf
Normal file
15
addons/hearing/initKeybinds.inc.sqf
Normal file
@ -0,0 +1,15 @@
|
||||
["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
|
@ -363,5 +363,8 @@
|
||||
<Spanish>Volumen durante la inconsciencia.</Spanish>
|
||||
<Korean>기절 시 볼륨입니다.</Korean>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Hearing_PutOrRemoveEarplugs">
|
||||
<English>Put/take out earplugs</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user