diff --git a/cScripts/functions/systems/fn_addArsenal.sqf b/cScripts/functions/systems/fn_addArsenal.sqf index 5a1105855..487f5f23c 100644 --- a/cScripts/functions/systems/fn_addArsenal.sqf +++ b/cScripts/functions/systems/fn_addArsenal.sqf @@ -24,18 +24,22 @@ private _arsenalStatement = { call FUNC(addDefaultArsenalLoadout); waitUntil { count ace_arsenal_defaultLoadoutsList != 0 }; - private _items = GETVAR(player,EGVAR(Player,ArsenalWhitelist), []); - INFO_3("Staging Arsenal", "Whitleist containing %1 items added to %2 (%3)", count _items, player, typeOf player); - if (count _items == 0) exitWith { - [ - [], - ["Arsenal is not avalible for your class."], - [""], - [""] - ] call CBA_fnc_notify; + if (EGVAR(Settings,useFilteredArsenal)) then { + private _items = GETVAR(player,EGVAR(Player,ArsenalWhitelist), []); + INFO_3("Staging Arsenal", "Whitleist containing %1 items added to %2 (%3)", count _items, player, typeOf player); + if (count _items == 0) exitWith { + [ + [], + ["Arsenal is not avalible for your class."], + [""], + [""] + ] call CBA_fnc_notify; + }; + [player, _items] call ace_arsenal_fnc_addVirtualItems; + } else { + [player, true] call ace_arsenal_fnc_addVirtualItems; }; - [player, _items] call ace_arsenal_fnc_addVirtualItems; [{ INFO_2("Staging Arsenal", "Opening Staging Arsenal for %1 (%2)", player, typeOf player); diff --git a/cScripts/initSettings.inc.sqf b/cScripts/initSettings.inc.sqf index d492cd7d4..498f43be4 100644 --- a/cScripts/initSettings.inc.sqf +++ b/cScripts/initSettings.inc.sqf @@ -142,7 +142,19 @@ private _cScriptSettings = "cScripts Mission Settings"; }, false ] call CBA_fnc_addSetting; - +[ // Use Filtered Arsenal + QEGVAR(Settings,useFilteredArsenal), + "CHECKBOX", + ["Use Filtered Arsenal","Use a filtered or show all items in the staging arsenal."], + [_cScriptSettings, "4; Staging"], + false, + true, + { + params ["_value"]; + { EGVAR(Staging,showAllLoadouts) = _value; } remoteExecCall ["call"]; + }, + false +] call CBA_fnc_addSetting; // 5; Vehicle [ // Enable @@ -326,4 +338,4 @@ private _cScriptSettings = "cScripts Mission Settings"; true, {}, true -] call CBA_fnc_addSetting; \ No newline at end of file +] call CBA_fnc_addSetting;