Fix UAV and Interaction Compile Inheritance

This commit is contained in:
PabstMirror 2015-05-17 13:51:59 -05:00
parent 9e8283ebab
commit 3daec7d98d
3 changed files with 23 additions and 13 deletions

View File

@ -26,12 +26,12 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
private "_recurseFnc";
_recurseFnc = {
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_position", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction", "_i"];
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_position", "_condition", "_showDisabled", "_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction"];
EXPLODE_1_PVT(_this,_actionsCfg);
_actions = [];
for "_i" from 0 to (count _actionsCfg) - 1 do {
_entryCfg = _actionsCfg select _i;
{
_entryCfg = _x;
if(isClass _entryCfg) then {
_displayName = getText (_entryCfg >> "displayName");
_distance = getNumber (_entryCfg >> "distance");
@ -90,7 +90,7 @@ _recurseFnc = {
];
_actions pushBack _entry;
};
};
} forEach (configProperties [_actionsCfg, "isClass _x", true]);
_actions
};

View File

@ -14,7 +14,7 @@
EXPLODE_1_PVT(_this,_target);
private ["_objectType","_actionsVarName", "_canCollapse", "_children", "_enableInside", "_entry", "_entryCfg", "_i", "_insertChildren", "_modifierFunction", "_runOnHover"];
private ["_objectType","_actionsVarName", "_canCollapse", "_children", "_enableInside", "_entry", "_entryCfg", "_insertChildren", "_modifierFunction", "_runOnHover"];
_objectType = _target;
if (typeName _target == "OBJECT") then {
_objectType = typeOf _target;
@ -31,8 +31,8 @@ _recurseFnc = {
EXPLODE_1_PVT(_this,_actionsCfg);
_actions = [];
for "_i" from 0 to (count _actionsCfg) - 1 do {
_entryCfg = _actionsCfg select _i;
{
_entryCfg = _x;
if(isClass _entryCfg) then {
_displayName = getText (_entryCfg >> "displayName");
@ -74,7 +74,7 @@ _recurseFnc = {
];
_actions pushBack _entry;
};
};
} forEach (configProperties [_actionsCfg, "isClass _x", true]);
_actions
};

View File

@ -1,15 +1,25 @@
class CfgVehicles {
class Helicopter_Base_F;
class UAV_01_base_F: Helicopter_Base_F {
class Air;
class Helicopter: Air {
class ACE_Actions {
class ACE_MainActions {
class ACE_MainActions {};
};
};
class Helicopter_Base_F: Helicopter {
class ACE_Actions: ACE_Actions{
class ACE_MainActions: ACE_MainActions {};
};
};
class UAV_01_base_F: Helicopter_Base_F {
class ACE_Actions: ACE_Actions{
class ACE_MainActions: ACE_MainActions {
class GVAR(RefuelUAV) {
displayName = "$STR_ACE_logistics_uavbattery_Recharge";
distance = 4;
condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRefuelUAV));
statement = QUOTE([ARR_2(_player, _target)] call FUNC(refuelUAV));
showDisabled = 0; \
priority = 1.245; \
showDisabled = 0;
priority = 1.245;
icon = QUOTE(PATHTOF(ui\UAV_battery_ca.paa));
};
};