mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Ensure the class actions are compiled from config before adding them from the API
This commit is contained in:
parent
5ab9ad87f9
commit
d02b5d2125
@ -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];
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Compile the action menu from config for an object's class
|
||||
*
|
||||
* Argument:
|
||||
* 0: Object <OBJECT>
|
||||
* 0: Object or class name <OBJECT> or <STRING>
|
||||
*
|
||||
* 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
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Compile the self action menu from config for an object's class
|
||||
*
|
||||
* Argument:
|
||||
* 0: Object <OBJECT>
|
||||
* 0: Object or class name <OBJECT> or <STRING>
|
||||
*
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user