2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2023-07-28 04:55:10 +00:00
|
|
|
/*
|
|
|
|
* Author: LinkIsGrim
|
|
|
|
* Removes a loadout from the "Default Loadouts" list.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Name of loadout <STRING>
|
|
|
|
* 1: Remove globally <BOOL> (default: false)
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* ["Squad Leader", true] call ace_arsenal_fnc_removeDefaultLoadout
|
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
|
|
|
params [["_name", "", [""]], ["_global", false, [false]]];
|
|
|
|
|
2024-01-06 21:27:04 +00:00
|
|
|
if (_global) exitWith {
|
|
|
|
private _eventID = format [QGVAR(loadouts_%1), _name];
|
|
|
|
[_eventID] call CBA_fnc_removeGlobalEventJIP;
|
|
|
|
[QGVAR(removeDefaultLoadout), [_name]] call CBA_fnc_globalEvent;
|
2023-07-28 04:55:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GVAR(defaultLoadoutsList) deleteAt (GVAR(defaultLoadoutsList) findIf {(_x select 0) == _name});
|
|
|
|
|
|
|
|
if (is3DEN) then {
|
|
|
|
set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]];
|
|
|
|
};
|