28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
params ["_type"]; // string of the object's classname
|
|
if (!(_type isKindOf "CAManBase")) exitWith {};
|
|
|
|
if (
|
|
(localNamespace getVariable ["milsim_respawn_checkReinsertQueueClassesAdded", []])
|
|
find _type != -1
|
|
) exitWith {};
|
|
|
|
private _checkReinsertQueueAction = [
|
|
"milsim_respawn_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 milsim_respawn_fnc_requestShowQueue;
|
|
// reset last check time
|
|
localNamespace setVariable ["milsim_respawn_lastReinsertQueueCheck", diag_tickTime];
|
|
},
|
|
{
|
|
missionNamespace getVariable ["milsim_respawn_setting_reinsertion_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 ["milsim_respawn_checkReinsertQueueClassesAdded", []]);
|
|
_classesActionsAddedTo pushBackUnique _type;
|
|
localNamespace setVariable ["milsim_respawn_checkReinsertQueueClassesAdded", _classesActionsAddedTo]; |