Skip to content

Commit

Permalink
Merge pull request #857 from AndreasBrostrom/cbaextendedloadout
Browse files Browse the repository at this point in the history
Change to usage of CBA loadout array
  • Loading branch information
AndreasBrostrom authored Feb 18, 2023
2 parents 8a9d097 + 8acb36b commit 3cbe84d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cScripts/functions/gear/fn_gear_applyLoadout.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if (_loadConfig) then {
switch (true) do {
case _loadArray: {
if (EGVAR(patches,usesACRE)) then { _loadout = [_loadout] call acre_api_fnc_filterUnitLoadout };
_unit setUnitLoadout _loadout;
[_unit, _loadout] call CBA_fnc_setLoadout;
#ifdef DEBUG_MODE
[format["Loadout array applied to %1", _unit], "Gear"] call FUNC(info);
#endif
Expand All @@ -64,7 +64,7 @@ switch (true) do {
if (_loadout != "") then {
_loadout = parseSimpleArray _loadout;
if (EGVAR(patches,usesACRE)) then { _loadout = [_loadout] call acre_api_fnc_filterUnitLoadout };
_unit setUnitLoadout _loadout;
[_unit, _loadout] call CBA_fnc_setLoadout;
#ifdef DEBUG_MODE
[format["Loadout %1 applied to %2", _classname, _unit], "Gear"] call FUNC(info);
#endif
Expand Down
2 changes: 1 addition & 1 deletion cScripts/functions/gear/fn_gear_saveLoadout.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

params [["_unit", objNull, [objNull]]];

private _loadout = getUnitLoadout _unit;
private _loadout = [_unit] call CBA_fnc_getLoadout;
if (EGVAR(patches,usesACRE)) then { _loadout = [_loadout] call acre_api_fnc_filterUnitLoadout };

_unit setVariable [QEGVAR(gear,Loadout), _loadout];
Expand Down
2 changes: 1 addition & 1 deletion cScripts/functions/helpers/fn_exportLoadoutToArsenal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private _loadoutList = "getText (_x >> 'displayName') != ''" configClasses (miss
private _unitName = getText (missionConfigFile >> "CfgLoadouts" >> _loadout >> "displayName");

[player, _loadout] call Poppy_fnc_applyLoadout;
private _loadoutArray = getUnitLoadout player;
private _loadoutArray = [_unit] call CBA_fnc_getLoadout;

private _br = toString[13,10];
_string = formatText["[""[7CAV] %1 - %2"", %3] call ace_arsenal_fnc_addDefaultLoadout; //%4%5", _unitCompany, _unitName, _loadoutArray, _loadout, _br];
Expand Down

0 comments on commit 3cbe84d

Please sign in to comment.