diff --git a/addons/interact_menu/functions/fnc_addClassAction.sqf b/addons/interact_menu/functions/fnc_addClassAction.sqf index 5916edbfbc..4931328af2 100644 --- a/addons/interact_menu/functions/fnc_addClassAction.sqf +++ b/addons/interact_menu/functions/fnc_addClassAction.sqf @@ -27,6 +27,13 @@ EXPLODE_9_PVT(_this,_objectType,_typeNum,_fullPath,_displayName,_icon,_position,_statement,_condition,_distance); +// Ensure the config menu was compiled first +if (_typeNum == 0) then { + [_objectType] call FUNC(compileMenu); +} else { + [_objectType] call FUNC(compileMenuSelfAction); +}; + private ["_varName","_actions","_params","_entry", "_parentLevel", "_foundParentLevel", "_fnc_findFolder"]; _varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType]; diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index d509f5abc8..5ba4a1b5a7 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -3,7 +3,7 @@ * Compile the action menu from config for an object's class * * Argument: - * 0: Object + * 0: Object or class name or * * Return value: * None @@ -12,10 +12,13 @@ */ #include "script_component.hpp"; -EXPLODE_1_PVT(_this,_object); +EXPLODE_1_PVT(_this,_target); private ["_objectType","_actionsVarName"]; -_objectType = typeOf _object; +_objectType = _target; +if (typeName _target == "OBJECT") then { + _objectType = typeOf _target; +}; _actionsVarName = format [QGVAR(Act_%1), _objectType]; // Exit if the action menu is already compiled for this class diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 42b76785f5..9407ce6dcd 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -3,7 +3,7 @@ * Compile the self action menu from config for an object's class * * Argument: - * 0: Object + * 0: Object or class name or * * Return value: * None @@ -12,10 +12,13 @@ */ #include "script_component.hpp"; -EXPLODE_1_PVT(_this,_object); +EXPLODE_1_PVT(_this,_target); private ["_objectType","_actionsVarName"]; -_objectType = typeOf _object; +_objectType = _target; +if (typeName _target == "OBJECT") then { + _objectType = typeOf _target; +}; _actionsVarName = format [QGVAR(SelfAct_%1), _objectType]; // Exit if the action menu is already compiled for this class diff --git a/addons/interact_menu/functions/fnc_keyUp.sqf b/addons/interact_menu/functions/fnc_keyUp.sqf index 70e7438125..716d6dafd8 100644 --- a/addons/interact_menu/functions/fnc_keyUp.sqf +++ b/addons/interact_menu/functions/fnc_keyUp.sqf @@ -21,7 +21,7 @@ if(GVAR(actionSelected)) then { if (GVAR(keyDown)) then { GVAR(keyDown) = false; - ["interactMenuClosed", [0]] call FUNC(localEvent); + ["interactMenuClosed", [0]] call EFUNC(common,localEvent); }; GVAR(expanded) = false; diff --git a/addons/interact_menu/functions/fnc_keyUpSelfAction.sqf b/addons/interact_menu/functions/fnc_keyUpSelfAction.sqf index 924fd4cca6..6346696d53 100644 --- a/addons/interact_menu/functions/fnc_keyUpSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_keyUpSelfAction.sqf @@ -25,7 +25,7 @@ if(GVAR(actionSelected)) then { if (GVAR(keyDownSelfAction)) then { GVAR(keyDownSelfAction) = false; - ["interactMenuClosed", [1]] call FUNC(localEvent); + ["interactMenuClosed", [1]] call EFUNC(common,localEvent); }; GVAR(expanded) = false; diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 4543f1a3ad..b34403148e 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -192,7 +192,7 @@ class ACE_Medical_Actions { treatmentLocations[] = {"All"}; requiredMedic = 0; treatmentTime = 7.5; - items[] = {QVAR(bodyBag)}; + items[] = {QGVAR(bodyBag)}; condition = "!alive (_this select 1);"; callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag)); callbackFailure = "";