2015-01-13 04:17:52 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-01-29 07:38:46 +00:00
|
|
|
ADDON = false;
|
|
|
|
|
2016-11-23 19:35:25 +00:00
|
|
|
PREP_RECOMPILE_START;
|
2016-02-22 14:20:36 +00:00
|
|
|
#include "XEH_PREP.hpp"
|
2016-11-23 19:35:25 +00:00
|
|
|
PREP_RECOMPILE_END;
|
2015-01-29 07:38:46 +00:00
|
|
|
|
2023-12-07 03:20:47 +00:00
|
|
|
#include "initSettings.inc.sqf"
|
2021-10-11 20:48:30 +00:00
|
|
|
|
2022-09-23 17:40:57 +00:00
|
|
|
["CBA_loadoutSet", {
|
|
|
|
params ["_unit", "_loadout", "_extendedInfo"];
|
2024-06-20 05:04:34 +00:00
|
|
|
|
2022-09-23 17:40:57 +00:00
|
|
|
if (_extendedInfo getOrDefault ["ace_earplugs", false]) then {
|
|
|
|
_unit setVariable ["ACE_hasEarPlugsIn", true, true];
|
2024-03-21 19:26:46 +00:00
|
|
|
|
2024-06-20 05:04:34 +00:00
|
|
|
// Only force update volume if unit is a player (including remote controlled)
|
|
|
|
if (_unit call EFUNC(common,isPlayer)) then {
|
|
|
|
[QGVAR(updateVolume), true, _unit] call CBA_fnc_targetEvent;
|
|
|
|
};
|
2022-09-23 17:40:57 +00:00
|
|
|
};
|
|
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
|
|
|
|
["CBA_loadoutGet", {
|
|
|
|
params ["_unit", "_loadout", "_extendedInfo"];
|
2024-06-20 05:04:34 +00:00
|
|
|
|
2022-09-23 17:40:57 +00:00
|
|
|
if (_unit getVariable ["ACE_hasEarPlugsin", false]) then {
|
|
|
|
_extendedInfo set ["ace_earplugs", true]
|
|
|
|
};
|
|
|
|
}] call CBA_fnc_addEventHandler;
|
|
|
|
|
2015-01-29 07:38:46 +00:00
|
|
|
ADDON = true;
|