add forcedPilotCheck setting, some formatting changes

This commit is contained in:
2024-01-26 21:22:35 -08:00
parent 4ced508005
commit e395fa9c16
2 changed files with 28 additions and 5 deletions

View File

@@ -256,7 +256,8 @@ if (hasInterface) then {
if ((typeOf player) in ["B_Helipilot_F", "B_helicrew_F"]) then { if ((typeOf player) in ["B_Helipilot_F", "B_helicrew_F"]) then {
[{ [{
if (not ( if (not (
missionNamespace getVariable ["milsim_respawn_setting_reinsertion_enabled", true] missionNamespace getVariable ["milsim_respawn_setting_reinsertion_enabled", true] &&
missionNamespace getVariable ["milsim_respawn_setting_reinsertion_pilotForcedCheckEnabled", true]
)) exitWith {}; )) exitWith {};
private _lastCheck = localNamespace getVariable ["milsim_respawn_lastReinsertQueueCheck", diag_tickTime]; private _lastCheck = localNamespace getVariable ["milsim_respawn_lastReinsertQueueCheck", diag_tickTime];
if ( if (
@@ -266,7 +267,7 @@ if (hasInterface) then {
// if last check was greater than 20 minutes ago, we'll prompt the notification now and reset the timer // if last check was greater than 20 minutes ago, we'll prompt the notification now and reset the timer
localNamespace setVariable ["milsim_respawn_lastReinsertQueueCheck", diag_tickTime]; localNamespace setVariable ["milsim_respawn_lastReinsertQueueCheck", diag_tickTime];
call milsim_respawn_fnc_showReinsertQueueNotification; call milsim_respawn_fnc_showReinsertQueueNotification;
}, 30] call CBA_fnc_addPerFrameHandler; }, 30] call CBA_fnc_addPerFrameHandler;
}; };

View File

@@ -149,7 +149,20 @@
true, // global setting true, // global setting
{ {
params ["_value"]; params ["_value"];
diag_log format["[milsim] (respawn_reinsertion) max range to ready set to %1", _value]; diag_log format["[milsim] (respawn_reinsertion) maxRangeToReady set to %1", _value];
}
] call CBA_fnc_addSetting;
[
"milsim_respawn_setting_reinsertion_pilotForcedCheckEnabled", // variable
"CHECKBOX", // type
["Enabled", "Whether or not pilots are forced to view the contents of the reinsertion queue per interval"], // title
["17th Battalion", "Re-insert Queue"], // category
true, // default value
true, // global setting
{
params ["_value"];
diag_log format["[milsim] (respawn_reinsertion) pilotForcedCheckEnabled set to %1", _value];
} }
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
@@ -159,7 +172,12 @@
["Pilot Check Interval", "Pilots will be force shown the queue if they haven't checked it in X seconds"], // title ["Pilot Check Interval", "Pilots will be force shown the queue if they haven't checked it in X seconds"], // title
["17th Battalion", "Re-insert Queue"], // category ["17th Battalion", "Re-insert Queue"], // category
[60*10, 60*30, 60*20, 0, false], // [_min, _max, _default, _trailingDecimals, _isPercentage [60*10, 60*30, 60*20, 0, false], // [_min, _max, _default, _trailingDecimals, _isPercentage
true true,
{
params ["_value"];
diag_log format["[milsim] (respawn_reinsertion) pilotForcedCheckInterval set to %1", _value];
}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@@ -168,7 +186,11 @@
["Request Timeout", "How long should at least one person be waiting before prompting a global notification."], // title ["Request Timeout", "How long should at least one person be waiting before prompting a global notification."], // title
["17th Battalion", "Re-insert Queue"], // category ["17th Battalion", "Re-insert Queue"], // category
[60*10, 60*30, 60*20, 0, false], // [_min, _max, _default, _trailingDecimals, _isPercentage [60*10, 60*30, 60*20, 0, false], // [_min, _max, _default, _trailingDecimals, _isPercentage
true true,
{
params ["_value"];
diag_log format["[milsim] (respawn_reinsertion) timeout set to %1", _value];
}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
diag_log text "[MILSIM] (settings) Custom CBA settings initialized"; diag_log text "[MILSIM] (settings) Custom CBA settings initialized";