diff --git a/addons/hearing/functions/fnc_addEarPlugs.sqf b/addons/hearing/functions/fnc_addEarPlugs.sqf index c541d786186..035d82956fd 100644 --- a/addons/hearing/functions/fnc_addEarPlugs.sqf +++ b/addons/hearing/functions/fnc_addEarPlugs.sqf @@ -24,10 +24,10 @@ params ["_unit"]; TRACE_2("params",_unit,typeOf _unit); // Exit if hearing is disabled OR autoAdd is disabled OR soldier has earplugs already in (persistence scenarios) -if (!GVAR(enableCombatDeafness) || {!GVAR(autoAddEarplugsToUnits)} || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {}; +if (!GVAR(enableCombatDeafness) || {GVAR(autoAddEarplugsToUnits) == 0} || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {}; -// add earplugs if the soldier has a rocket launcher -if ((secondaryWeapon _unit) != "") exitWith { +// Add earplugs if enabled for everyone or if the soldier has a rocket launcher +if (GVAR(autoAddEarplugsToUnits) == 2 || {(secondaryWeapon _unit) != ""}) exitWith { TRACE_1("has launcher - adding",_unit); _unit addItem "ACE_EarPlugs"; }; diff --git a/addons/hearing/initSettings.inc.sqf b/addons/hearing/initSettings.inc.sqf index f22a7b4eda5..9a56ad76c25 100644 --- a/addons/hearing/initSettings.inc.sqf +++ b/addons/hearing/initSettings.inc.sqf @@ -41,9 +41,9 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)]; ] call CBA_fnc_addSetting; [ - QGVAR(autoAddEarplugsToUnits), "CHECKBOX", + QGVAR(autoAddEarplugsToUnits), "LIST", [LSTRING(autoAddEarplugsToUnits_DisplayName), LSTRING(autoAddEarplugsToUnits_Description)], _category, - true, + [[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(heavyWeaponUnits), ELSTRING(common,Enabled)], 1], 1 ] call CBA_fnc_addSetting; diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 58d0bfa05d1..de741e55c1c 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -371,5 +371,8 @@ 귀마개 토글 Mettre/enlever les bouchons + + Only units with heavy weapons +