diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index 1b4ea27b46..2a0eeda1d2 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -22,6 +22,7 @@ if (!params [["_objectType", "", [""]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { ERROR("Bad Params"); + [] }; TRACE_4("params",_objectType,_typeNum,_parentPath,_action); @@ -38,6 +39,9 @@ if (param [4, false, [false]]) exitwith { ', _index]; TRACE_2("Added inheritable action",_objectType,_index); [_objectType, "init", _initEH, true, [], true] call CBA_fnc_addClassEventHandler; + + // Return the full path + (_parentPath + [_action select 0]) }; // Ensure the config menu was compiled first @@ -62,10 +66,11 @@ private _parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode); if (isNil {_parentNode}) exitWith { ERROR("Failed to add action"); ACE_LOGERROR_4("action (%1) to parent %2 on object %3 [%4]",(_action select 0),_parentPath,_objectType,_typeNum); + [] }; // Add action node as children of the correct node of action tree (_parentNode select 1) pushBack [_action,[]]; // Return the full path -(+ _parentPath) pushBack (_action select 0) +(_parentPath + [_action select 0]) diff --git a/addons/interact_menu/functions/fnc_addActionToObject.sqf b/addons/interact_menu/functions/fnc_addActionToObject.sqf index d307f8b9ad..31c8301735 100644 --- a/addons/interact_menu/functions/fnc_addActionToObject.sqf +++ b/addons/interact_menu/functions/fnc_addActionToObject.sqf @@ -21,6 +21,7 @@ if (!params [["_object", objNull, [objNull]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { ERROR("Bad Params"); + [] }; private _varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum; @@ -38,4 +39,4 @@ if (_parentPath isEqualTo ["ACE_MainActions"]) then { _actionList pushBack [_action, +_parentPath]; // Return the full path -(+ _parentPath) pushBack (_action select 0) +(_parentPath + [_action select 0])