mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Hearing - Add setting to add earplugs to all units (#9935)
Add option to add earplugs to all units
This commit is contained in:
parent
095ce88279
commit
5130a22008
@ -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";
|
||||
};
|
||||
|
@ -43,9 +43,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;
|
||||
|
@ -371,5 +371,8 @@
|
||||
<Korean>귀마개 토글</Korean>
|
||||
<French>Mettre/enlever les bouchons</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Hearing_heavyWeaponUnits">
|
||||
<English>Only units with heavy weapons</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user