mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into fixUAVandInteractionInhert
Conflicts: addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf
This commit is contained in:
@ -14,10 +14,12 @@
|
||||
|
||||
EXPLODE_1_PVT(_this,_target);
|
||||
|
||||
private ["_objectType","_actionsVarName"];
|
||||
private ["_objectType","_actionsVarName","_isMan"];
|
||||
_objectType = _target;
|
||||
_isMan = false;
|
||||
if (typeName _target == "OBJECT") then {
|
||||
_objectType = typeOf _target;
|
||||
_isMan = _target isKindOf "CAManBase";
|
||||
};
|
||||
_actionsVarName = format [QGVAR(Act_%1), _objectType];
|
||||
|
||||
@ -94,10 +96,16 @@ _recurseFnc = {
|
||||
_actions
|
||||
};
|
||||
|
||||
private "_actionsCfg";
|
||||
private ["_actionsCfg","_actions"];
|
||||
_actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_Actions";
|
||||
|
||||
missionNamespace setVariable [_actionsVarName, [_actionsCfg] call _recurseFnc];
|
||||
// If the classname inherits from CAManBase, just copy it's menu without recompiling a new one
|
||||
_actions = if (_isMan) then {
|
||||
+ (missionNamespace getVariable QGVAR(Act_CAManBase))
|
||||
} else {
|
||||
[_actionsCfg] call _recurseFnc
|
||||
};
|
||||
missionNamespace setVariable [_actionsVarName, _actions];
|
||||
|
||||
/*
|
||||
[
|
||||
|
Reference in New Issue
Block a user