From dc6e7832e967963ffa358a9c8d3e412c3205216b Mon Sep 17 00:00:00 2001 From: AndreasBrostrom Date: Sat, 13 Apr 2024 18:35:31 +0200 Subject: [PATCH] removed arsenal check --- cScripts/functions/gear/fn_gear_preInit.sqf | 48 ++++++++++----------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/cScripts/functions/gear/fn_gear_preInit.sqf b/cScripts/functions/gear/fn_gear_preInit.sqf index 94fc610f8..b3a71b798 100644 --- a/cScripts/functions/gear/fn_gear_preInit.sqf +++ b/cScripts/functions/gear/fn_gear_preInit.sqf @@ -21,35 +21,33 @@ EGVAR(gear,playerLoadoutGiven) = false; GVAR(StagingArsenalOpen) = false; // Arsenal Event Handlers -if (EGVAR(patches,usesACEArsenal)) then { - ["ace_arsenal_displayClosed", { - if (GVAR(StagingArsenalOpen)) then { - [{ - [player, true] call ace_arsenal_fnc_removeBox; - GVAR(StagingArsenalOpen) = false; +["ace_arsenal_displayClosed", { + if (GVAR(StagingArsenalOpen)) then { + [{ + [player, true] call ace_arsenal_fnc_removeBox; + GVAR(StagingArsenalOpen) = false; - // Save insignia - private _insigniaClass = [player] call BIS_fnc_getUnitInsignia; - [_insigniaClass] call EFUNC(profile,saveInsignia); + // Save insignia + private _insigniaClass = [player] call BIS_fnc_getUnitInsignia; + [_insigniaClass] call EFUNC(profile,saveInsignia); - // Reset default loadouts - call FUNC(addDefaultArsenalLoadouts); - }] call CBA_fnc_execNextFrame; - }; - }] call CBA_fnc_addEventHandler; + // Reset default loadouts + call FUNC(addDefaultArsenalLoadouts); + }] call CBA_fnc_execNextFrame; + }; +}] call CBA_fnc_addEventHandler; - [QEGVAR(StagingArsenal,displayOpen), { - GVAR(StagingArsenalOpen) = true; - }] call CBA_fnc_addEventHandler; +[QEGVAR(StagingArsenal,displayOpen), { + GVAR(StagingArsenalOpen) = true; +}] call CBA_fnc_addEventHandler; - [QEGVAR(StagingArsenal,SaveWhitelist), { - private _items = call FUNC(getArsenalWhitelist); - if (_items isEqualTo []) then { - SHOW_SERVER_WARNING_2("Arsenal","Arsenal whitelist not possilbe to be created for %1 [%2] and is empty",player,typeOf player); - }; - SETVAR(player,EGVAR(Player,ArsenalWhitelist),_items); - }] call CBA_fnc_addEventHandler; -}; +[QEGVAR(StagingArsenal,SaveWhitelist), { + private _items = call FUNC(getArsenalWhitelist); + if (_items isEqualTo []) then { + SHOW_SERVER_WARNING_2("Arsenal","Arsenal whitelist not possilbe to be created for %1 [%2] and is empty",player,typeOf player); + }; + SETVAR(player,EGVAR(Player,ArsenalWhitelist),_items); +}] call CBA_fnc_addEventHandler; // Loadout Event handlers if (isClass (missionConfigFile >> "CfgLoadouts")) then {