//--------------------- // Side Chat //--------------------- [ "milsim_sideChat", "CHECKBOX", "Side Chat Text Enabled", ["17th Battalion", "Side Chat"], false, true, { params ["_value"]; diag_log format["side chat activation set to %1", _value]; } ] call CBA_fnc_addSetting; ["milsim_sideChat", false] call CBA_settings_fnc_set; //--------------------- // Server CPS //--------------------- [ "milsim_server_cps_enable", "CHECKBOX", "CPS Metrics Enabled", ["17th Battalion", "Server Metrics"], true, true, { params ["_value"]; diag_log format["server cps activation set to %1", _value]; } ] call CBA_fnc_addSetting; ["milsim_server_cps_enable", true] call CBA_settings_fnc_set; [ "milsim_server_cps_interval", "TIME", "Metrics Interval", ["17th Battalion", "Server Metrics"], [60,300,120], true, { if (!isServer) exitWith {}; params ["_value"]; diag_log format["server cps interval set to %1", _value]; _cpsPFH = missionNamespace getVariable ["milsim_server_cps_handler", ObjNull]; if (!isNull _cpsPFH) then { _cpsPFH call CBA_fnc_deletePerFrameHandlerObject; }; _playerCpsPFH = missionNamespace getVariable ["milsim_player_cps_handler", ObjNull]; if (!isNull _playerCpsPFH) then { _playerCpsPFH call CBA_fnc_deletePerFrameHandlerObject; }; [] call milsim_fnc_addServerStatsPFH; } ] call CBA_fnc_addSetting; //--------------------- // Client CPS //--------------------- [ "milsim_client_cps_enable", "CHECKBOX", "CPS Metrics Enabled", ["17th Battalion", "Client Metrics"], true, true, { params ["_value"]; diag_log format["client cps activation set to %1", _value]; } ] call CBA_fnc_addSetting; ["milsim_client_cps_enable", true] call CBA_settings_fnc_set; [ "milsim_client_cps_interval", "TIME", "CPS Metrics Interval", ["17th Battalion", "Client Metrics"], [60,300,120], true, { if (!hasInterface) exitWith {}; params ["_value"]; diag_log format["client cps interval set to %1", _value]; _cpsPFH = player getVariable ["milsim_client_cps_handler", ObjNull]; if (!isNull _cpsPFH) then { _cpsPFH call CBA_fnc_deletePerFrameHandlerObject; }; [] call milsim_fnc_addClientStatsPFH; } ] call CBA_fnc_addSetting; //--------------------- // Medical Overlay //--------------------- [ "milsim_client_medState3D_enabled", // variable "CHECKBOX", // type ["Enable 3D Triage Card State", "Draws a colored dot over units within 10m indicating current ACE Triage State"], // title ["17th Battalion", "Medical"], // category true // default value ] call CBA_fnc_addSetting; [ "milsim_client_medState3D_drawRange", // variable "LIST", // type ["Range To Draw Icons", "Determines range at which dots are visible"], // title ["17th Battalion", "Medical"], // category [[2, 4, 6, 8, 10], ["2", "4", "6", "8", "10"], 4] // option values, option labels, default index ] call CBA_fnc_addSetting; //--------------------- // Respawn Settings [ "milsim_reinsert_setting_reinsertion_enabled", // variable "CHECKBOX", // type ["Enabled", "Whether or not players can file for reinsert and pilots can check the reinsert queue"], // title ["17th Battalion", "Re-insert Queue"], // category true, // default value true, // global setting { params ["_value"]; [ "respawn_reinsertion", "SETTING CHANGED", [ [ "setting", "milsim_reinsert_setting_reinsertion_enabled" ], ["newValue", _value] ] ] call milsim_util_fnc_log; } ] call CBA_fnc_addSetting; [ "milsim_reinsert_setting_reinsertion_maxRangeToReady", // variable "SLIDER", // type ["Max Request Filing Range", "Maximum distance from a respawn point a player can be to ready up"], // title ["17th Battalion", "Re-insert Queue"], // category [0, 1000, 400, 0, false], // [_min, _max, _default, _trailingDecimals, _isPercentage] true, // global setting { params ["_value"]; [ "respawn_reinsertion", "SETTING CHANGED", [ [ "setting", "milsim_reinsert_setting_reinsertion_maxRangeToReady" ], ["newValue", _value] ] ] call milsim_util_fnc_log; } ] call CBA_fnc_addSetting; [ "milsim_reinsert_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"]; [ "respawn_reinsertion", "SETTING CHANGED", [ [ "setting", "milsim_reinsert_setting_reinsertion_pilotForcedCheckEnabled" ], ["newValue", _value] ] ] call milsim_util_fnc_log; } ] call CBA_fnc_addSetting; [ "milsim_reinsert_setting_reinsertion_pilotForcedCheckInterval", // variable "TIME", // type ["Pilot Forced 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 [60*5, 60*30, 60*10], // [_min, _max, _default] true, { params ["_value"]; [ "respawn_reinsertion", "SETTING CHANGED", [ [ "setting", "milsim_reinsert_setting_reinsertion_pilotForcedCheckInterval" ], ["newValue", _value] ] ] call milsim_util_fnc_log; } ] call CBA_fnc_addSetting; [ "milsim_reinsert_setting_reinsertion_max_wait", // variable "TIME", // type ["Max Wait Threshold", "How long should at least one person be waiting before prompting a global notification."], // title ["17th Battalion", "Re-insert Queue"], // category [60*5, 60*30, 60*20], // [_min, _max, _default] true, { params ["_value"]; [ "respawn_reinsertion", "SETTING CHANGED", [ [ "setting", "milsim_reinsert_setting_reinsertion_max_wait" ], ["newValue", _value] ] ] call milsim_util_fnc_log; } ] call CBA_fnc_addSetting; diag_log text "[MILSIM] (settings) Custom CBA settings initialized"; nil;