Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBA Extended Loadouts #669

Merged
merged 4 commits into from
Oct 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion addons/common/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ PREP(getPylonTurret);
PREP(getSelectedUnits);
PREP(getSelectedVehicles);
PREP(getSideIcon);
PREP(getUnitLoadout);
PREP(getVehicleAmmo);
PREP(getVehicleIcon);
PREP(getWeaponReloadTime);
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_deserializeObjects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private _fnc_deserializeUnit = {
[{
params ["_unit", "_loadout"];

_unit setUnitLoadout _loadout;
[_unit, _loadout] call CBA_fnc_setLoadout;
[_unit] call BIN_fnc_CBRNHoseInit;
}, [_unit, _loadout]] call CBA_fnc_execNextFrame;

Expand Down
4 changes: 2 additions & 2 deletions addons/common/functions/fnc_exportMissionSQF.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ private _fnc_processInventory = {
_outputObjects pushBack ["['%1', 'onEachFrame', {", _nextFrameHandle];
_outputObjects pushBack " params [""_unit""];";
if !(_object call FUNC(hasDefaultInventory)) then {
private _loadout = [_object] call FUNC(getUnitLoadout);
_outputObjects pushBack [" _unit setUnitLoadout %1;", _loadout];
private _loadout = [_object] call CBA_fnc_getLoadout;
_outputObjects pushBack [" [_unit, %1] call CBA_fnc_setLoadout;", _loadout];
};
_outputObjects pushBack " _unit call BIN_fnc_CBRNHoseInit;";
_outputObjects pushBack [" ['%1', 'onEachFrame'] call BIS_fnc_removeStackedEventHandler;", _nextFrameHandle];
Expand Down
27 changes: 0 additions & 27 deletions addons/common/functions/fnc_getUnitLoadout.sqf

This file was deleted.

2 changes: 1 addition & 1 deletion addons/common/functions/fnc_hasDefaultInventory.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ params ["_object"];

// Compare current loadout to config defined loadout if an infantry unit is given
if (_object isKindOf "CAManBase") exitWith {
private _current = [_object] call FUNC(getUnitLoadout);
private _current = [_object] call CBA_fnc_getLoadout select 0;
private _default = getUnitLoadout typeOf _object;

// Always match facewear because it is influenced by identity, not config inventory
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_serializeObjects.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private _fnc_serializeUnit = {
private _skill = skill _unit;
private _stance = unitPos _unit;

private _loadout = [_unit] call FUNC(getUnitLoadout);
private _loadout = [_unit] call CBA_fnc_getLoadout;
private _identity = [name _unit, face _unit, speaker _unit, pitch _unit, nameSound _unit, _unit call BIS_fnc_getUnitInsignia];
private _flagTexture = getForcedFlagTexture _unit;

Expand Down
4 changes: 2 additions & 2 deletions addons/context_actions/CfgContext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ class EGVAR(context_menu,actions) {
};
class Copy {
displayName = "$STR_3DEN_Display3DEN_MenuBar_EntityCopy_text";
statement = QUOTE(GVAR(loadout) = _hoveredEntity call EFUNC(common,getUnitLoadout));
statement = QUOTE(GVAR(loadout) = _hoveredEntity call CBA_fnc_getLoadout);
icon = QPATHTOF(ui\copy_ca.paa);
};
class Paste {
displayName = "$STR_3DEN_Display3DEN_MenuBar_EntityPaste_text";
condition = QUOTE(!isNil QQGVAR(loadout));
statement = QUOTE(_hoveredEntity setUnitLoadout GVAR(loadout));
statement = QUOTE([ARR_2(_hoveredEntity,GVAR(loadout))] call CBA_fnc_setLoadout);
icon = QPATHTOF(ui\paste_ca.paa);
};
class Reset {
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_mod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 2.10
#define REQUIRED_CBA_VERSION {3,15,5}
#define REQUIRED_CBA_VERSION {3,15,8}

#ifdef COMPONENT_BEAUTIFIED
#define COMPONENT_NAME QUOTE(ZEN - COMPONENT_BEAUTIFIED)
Expand Down