30 lines
1.1 KiB
Plaintext
30 lines
1.1 KiB
Plaintext
#include "..\script_component.hpp"
|
|
|
|
params ["_type"]; // string of the object's classname
|
|
if (!(_type isKindOf "CAManBase")) exitWith {};
|
|
|
|
if (
|
|
(localNamespace getVariable [QGVAR(checkReinsertQueueClassesAdded), []])
|
|
find _type != -1
|
|
) exitWith {};
|
|
|
|
private _checkReinsertQueueAction = [
|
|
QGVAR(checkReinsertQueue),
|
|
"[PILOT] Check Re-insert Queue",
|
|
"\A3\ui_f\data\igui\cfg\simpleTasks\types\land_ca.paa",
|
|
{
|
|
params ["_target", "_player", "_params"];
|
|
// request notification from the server
|
|
call FUNC(requestShowQueue);
|
|
// reset last check time
|
|
localNamespace setVariable [QGVAR(lastReinsertQueueCheck), diag_tickTime];
|
|
},
|
|
{
|
|
missionNamespace getVariable [QGVAR(setting_enabled), true]
|
|
} // always allow
|
|
] call ace_interact_menu_fnc_createAction;
|
|
[_type, 1, ["ACE_SelfActions"], _checkReinsertQueueAction, true] call ace_interact_menu_fnc_addActionToClass;
|
|
|
|
private _classesActionsAddedTo = (localNamespace getVariable [QGVAR(checkReinsertQueueClassesAdded), []]);
|
|
_classesActionsAddedTo pushBackUnique _type;
|
|
localNamespace setVariable [QGVAR(checkReinsertQueueClassesAdded), _classesActionsAddedTo]; |