big refactor to isolate functionality. adds milsim_fnc_log.
This commit is contained in:
28
functions/reinsert/client/fn_addCheckQueueSelfAction.sqf
Normal file
28
functions/reinsert/client/fn_addCheckQueueSelfAction.sqf
Normal file
@@ -0,0 +1,28 @@
|
||||
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];
|
||||
Reference in New Issue
Block a user