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 loadout support #41

Merged
merged 4 commits into from
Sep 17, 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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
releases/*
*.biprivatekey
keys/*
.hemtt/local
.hemtt/local
hemtt.exe
20 changes: 10 additions & 10 deletions addons/main/CfgVehicles.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ class CfgVehicles
icon = "iconObject_1x1";
};

class Man;
class CAManBase: Man
{
class ACE_SelfActions
{
class ACE_Equipment {
#include "ACE_SelfActions.hpp"
};
};
};
class Man;
class CAManBase: Man
{
class ACE_SelfActions
{
class ACE_Equipment {
#include "ACE_SelfActions.hpp"
};
};
};
};
18 changes: 18 additions & 0 deletions addons/main/functions/misc/fn_registerCBASettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,21 @@
(call compile format ["[%1]", _this]) call GRAD_slingHelmet_fnc_addHelmetToWhitelist;
}
] call CBA_Settings_fnc_init;

["CBA_loadoutSet", {
params ["_unit", "", "_extradata"];
private _helmetClass = _extradata getOrDefault ["grad_slingHelmet", ""];
if (_helmetClass isNotEqualTo "") then {
[_unit, _helmetClass] call GRAD_slingHelmet_fnc_addSlungHelmet;
} else {
[_unit] call GRAD_slingHelmet_fnc_removeSlungHelmet;
};
}] call CBA_fnc_addEventHandler;

["CBA_loadoutGet", {
params ["_unit", "", "_extradata"];
private _helmetClass = [_unit] call GRAD_slingHelmet_fnc_getSlungHelmet;
if (_helmetClass isNotEqualTo "") then {
_extradata set ["grad_slingHelmet", _helmetClass];
};
}] call CBA_fnc_addEventHandler;