simplify resupply actions addition
This commit is contained in:
@@ -5,26 +5,16 @@ if (!hasInterface) exitWith {};
|
||||
// ACE SELF-INTERACTIONS FOR FILING AND RESCINDING REINSERT REQUESTS NEAR BASE - ALL PLAYERS
|
||||
localNamespace setVariable [QGVAR(fileForReinsertClassesAdded), []];
|
||||
// add actions to current class
|
||||
[typeOf player] call FUNC(addAceSelfActions);
|
||||
// add actions to future classes
|
||||
["ace_interact_menu_newControllableObject", {
|
||||
_this call FUNC(addAceSelfActions);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
[["CAManBase"], true] call FUNC(addAceSelfActions);
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// PILOTS ONLY
|
||||
// ACE SELF-INTERACTIONS FOR CHECKING REINSERT QUEUE - ONLY FOR PILOTS
|
||||
if ((typeOf player) in ["B_Helipilot_F", "B_helicrew_F"]) then {
|
||||
localNamespace setVariable [QGVAR(checkReinsertQueueClassesAdded), []];
|
||||
localNamespace setVariable [QGVAR(lastReinsertQueueCheck), diag_tickTime];
|
||||
localNamespace setVariable [QGVAR(checkReinsertQueueClassesAdded), []];
|
||||
localNamespace setVariable [QGVAR(lastReinsertQueueCheck), diag_tickTime];
|
||||
|
||||
// add actions to current class
|
||||
[typeOf player] call FUNC(addCheckQueueSelfAction);
|
||||
// add actions to future classes
|
||||
["ace_interact_menu_newControllableObject", {
|
||||
_this call FUNC(addCheckQueueSelfAction);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
// add actions to pilot classes, and don't apply to child classes
|
||||
[["B_Helipilot_F", "B_helicrew_F"], false] call FUNC(addCheckQueueSelfAction);
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -33,13 +23,13 @@ if ((typeOf player) in ["B_Helipilot_F", "B_helicrew_F"]) then {
|
||||
[{
|
||||
// if module not enabled and pilot forced check not enabled, exit
|
||||
if (not (
|
||||
missionNamespace getVariable [QGVAR(setting_enabled), true] &&
|
||||
missionNamespace getVariable [QGVAR(setting_pilotForcedCheckEnabled), true]
|
||||
[QGVAR(setting_enabled)] call CBA_settings_fnc_get and
|
||||
[QGVAR(setting_pilotForcedCheckEnabled)] call CBA_settings_fnc_get
|
||||
)) exitWith {};
|
||||
|
||||
// if last check was less than X minutes ago, skip
|
||||
private _lastCheck = localNamespace getVariable [QGVAR(lastReinsertQueueCheck), diag_tickTime];
|
||||
private _requiredCheckInterval = missionNamespace getVariable [QGVAR(setting_pilotForcedCheckInterval), 60*20];
|
||||
private _requiredCheckInterval = [QGVAR(setting_pilotForcedCheckInterval)] call CBA_settings_fnc_get;
|
||||
if (
|
||||
diag_tickTime - _lastCheck <
|
||||
_requiredCheckInterval
|
||||
|
||||
Reference in New Issue
Block a user