Skip to content

Commit

Permalink
removed arsenal check
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom committed Apr 13, 2024
1 parent 6847e6d commit dc6e783
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions cScripts/functions/gear/fn_gear_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit dc6e783

Please sign in to comment.