Interact Menu - Don't show interactions for virtual units (#7271)

* Interact Menu - Don't show interactions for virtual units

* be consistant
This commit is contained in:
PabstMirror 2019-12-07 14:58:44 -06:00 committed by GitHub
parent 5ae0ef6bbe
commit bcbffcff26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 6 deletions

View File

@ -21,6 +21,7 @@ class Extended_Init_EventHandlers {
class CAManBase {
class ADDON {
init = QUOTE(_this call DFUNC(initPerson));
exclude[] = {"VirtualMan_F"};
};
};
class StaticWeapon {

View File

@ -106,6 +106,6 @@ GVAR(inheritedClassesMan) = [];
[_type, _typeNum, _parentPath, _action] call FUNC(addActionToClass);
} forEach GVAR(inheritedActionsMan);
END_COUNTER(InitPost);
}] call CBA_fnc_addClassEventHandler;
}, true, ["VirtualMan_F"]] call CBA_fnc_addClassEventHandler;
ADDON = true;

View File

@ -26,15 +26,15 @@ private _namespace = GVAR(ActNamespace);
// Exit if the action menu is already compiled for this class
if !(isNil {_namespace getVariable _objectType}) exitWith {};
if ((_objectType isKindOf "CAManBase") && {!isNil QGVAR(cacheManActions)}) exitWith {
_namespace setVariable [_objectType, +GVAR(cacheManActions)]; // copy
};
if ((getNumber (configFile >> "CfgVehicles" >> _objectType >> "isPlayableLogic")) == 1) exitWith {
if (_objectType isKindOf "VirtualMan_F") exitWith { // these have config: isPlayableLogic = 1
TRACE_1("skipping playable logic",_objectType);
_namespace setVariable [_objectType, []];
};
if ((_objectType isKindOf "CAManBase") && {!isNil QGVAR(cacheManActions)}) exitWith {
_namespace setVariable [_objectType, +GVAR(cacheManActions)]; // copy
};
private _recurseFnc = {
params ["_actionsCfg", "_parentDistance"];
private _actions = [];