General - Cleaned up cbaSettings_settingChanged (#10050)

Adapted `cbaSettings_settingChanged`
This commit is contained in:
johnb432 2024-05-31 22:20:21 +02:00 committed by GitHub
parent dc56cdbd8b
commit 1cca2db964
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 67 additions and 150 deletions

View File

@ -15,7 +15,5 @@ private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"
[LSTRING(disableArtilleryComputer_displayName), LSTRING(disableArtilleryComputer_description)], [LSTRING(disableArtilleryComputer_displayName), LSTRING(disableArtilleryComputer_description)],
_categoryName, _categoryName,
false, // default value false, // default value
true, // isGlobal true // isGlobal
{[QGVAR(disableArtilleryComputer), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -6,8 +6,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
[LSTRING(ModuleSettings_enable), LSTRING(ModuleSettings_enable_Description)], [LSTRING(ModuleSettings_enable), LSTRING(ModuleSettings_enable_Description)],
_category, _category,
true, true,
1, 1
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -16,8 +15,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
[LSTRING(loadTimeCoefficient), LSTRING(loadTimeCoefficient_description)], [LSTRING(loadTimeCoefficient), LSTRING(loadTimeCoefficient_description)],
_category, _category,
[0, 10, 5, 1], [0, 10, 5, 1],
1, 1
{[QGVAR(loadTimeCoefficient), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -26,8 +24,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
[LSTRING(paradropTimeCoefficent), LSTRING(paradropTimeCoefficent_description)], [LSTRING(paradropTimeCoefficent), LSTRING(paradropTimeCoefficent_description)],
_category, _category,
[0, 10, 2.5, 1], [0, 10, 2.5, 1],
1, 1
{[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -35,9 +32,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
"LIST", "LIST",
[LSTRING(openAfterUnload), LSTRING(openAfterUnload_description)], [LSTRING(openAfterUnload), LSTRING(openAfterUnload_description)],
_category, _category,
[[0, 1, 2, 3], [ELSTRING(common,never), LSTRING(unloadObject), LSTRING(paradropButton), ELSTRING(common,both)], 0], [[0, 1, 2, 3], [ELSTRING(common,never), LSTRING(unloadObject), LSTRING(paradropButton), ELSTRING(common,both)], 0]
0,
{[QGVAR(openAfterUnload), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -45,9 +40,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
"CHECKBOX", "CHECKBOX",
[LSTRING(carryAfterUnload), LSTRING(carryAfterUnload_description)], [LSTRING(carryAfterUnload), LSTRING(carryAfterUnload_description)],
_category, _category,
true, true
0,
{[QGVAR(carryAfterUnload), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -56,8 +49,7 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
[LSTRING(enableDeploy), LSTRING(enableDeploy_description)], [LSTRING(enableDeploy), LSTRING(enableDeploy_description)],
_category, _category,
true, true,
1, 1
{[QGVAR(enableDeploy), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -65,7 +57,5 @@ private _category = [ELSTRING(main,Category_Logistics), LSTRING(openMenu)];
"CHECKBOX", "CHECKBOX",
[LSTRING(ModuleSettings_enableRename), LSTRING(ModuleSettings_enableRename_Description)], [LSTRING(ModuleSettings_enableRename), LSTRING(ModuleSettings_enableRename_Description)],
_category, _category,
true, true
0,
{[QGVAR(enableRename), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -222,6 +222,9 @@ if (isServer) then {
[QGVAR(claimSafe), LINKFUNC(claimSafeServer)] call CBA_fnc_addEventHandler; [QGVAR(claimSafe), LINKFUNC(claimSafeServer)] call CBA_fnc_addEventHandler;
}; };
["CBA_SettingChanged", {
["ace_settingChanged", _this] call CBA_fnc_localEvent;
}] call CBA_fnc_addEventHandler;
////////////////////////////////////////////////// //////////////////////////////////////////////////
// Set up remote execution // Set up remote execution

View File

@ -1,8 +1,8 @@
#include "..\script_component.hpp" #include "..\script_component.hpp"
/* /*
* Author: PabstMirror * Author: PabstMirror
* Function for handeling a cba setting being changed. * Function for handling a cba setting being changed.
* Adds warning if global setting is changed after ace_settingsInitialized * Adds warning if global setting is changed after ace_settingsInitialized.
* *
* Arguments: * Arguments:
* 0: Setting Name <STRING> * 0: Setting Name <STRING>
@ -21,9 +21,7 @@
params ["_settingName", "_newValue", ["_canBeChanged", false]]; params ["_settingName", "_newValue", ["_canBeChanged", false]];
TRACE_2("",_settingName,_newValue); TRACE_2("",_settingName,_newValue);
["ace_settingChanged", [_settingName, _newValue]] call CBA_fnc_localEvent; if !((toLower _settingName) in CBA_settings_needRestart) exitWith {};
if (!((toLower _settingName) in CBA_settings_needRestart)) exitWith {};
if (_canBeChanged) exitWith {WARNING_1("update cba setting [%1] to use correct Need Restart param",_settingName);}; if (_canBeChanged) exitWith {WARNING_1("update cba setting [%1] to use correct Need Restart param",_settingName);};
if (!GVAR(settingsInitFinished)) exitWith {}; // Ignore changed event before CBA_settingsInitialized if (!GVAR(settingsInitFinished)) exitWith {}; // Ignore changed event before CBA_settingsInitialized

View File

@ -13,9 +13,7 @@
[LSTRING(enableFire_name), LSTRING(enableFire_tooltip)], [LSTRING(enableFire_name), LSTRING(enableFire_tooltip)],
LSTRING(category_displayName), LSTRING(category_displayName),
true, // default value true, // default value
true, // isGlobal true // isGlobal
{[QGVAR(enableFire), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -23,9 +21,7 @@
[LSTRING(destroyVehicleAfterCookoff_name), LSTRING(destroyVehicleAfterCookoff_tooltip)], [LSTRING(destroyVehicleAfterCookoff_name), LSTRING(destroyVehicleAfterCookoff_tooltip)],
LSTRING(category_displayName), LSTRING(category_displayName),
false, // default value false, // default value
true, // isGlobal true // isGlobal
{[QGVAR(destroyVehicleAfterCookoff), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -33,9 +29,7 @@
[LSTRING(enableAmmoCookoff_name), LSTRING(enableAmmoCookoff_tooltip)], [LSTRING(enableAmmoCookoff_name), LSTRING(enableAmmoCookoff_tooltip)],
LSTRING(category_displayName), LSTRING(category_displayName),
true, // default value true, // default value
true, // isGlobal true // isGlobal
{[QGVAR(enableAmmoCookoff), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [

View File

@ -45,17 +45,12 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]];
[LSTRING(progressBarTimeCoefficent_displayName), LSTRING(progressBarTimeCoefficent_description)], [LSTRING(progressBarTimeCoefficent_displayName), LSTRING(progressBarTimeCoefficent_description)],
_categoryArray, _categoryArray,
[0,2,1,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] [0,2,1,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal true // isGlobal
{[QGVAR(progressBarTimeCoefficent), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
QGVAR(dragAfterDeploy), "CHECKBOX", QGVAR(dragAfterDeploy), "CHECKBOX",
[LSTRING(dragAfterDeploy_displayName), LSTRING(dragAfterDeploy_description)], [LSTRING(dragAfterDeploy_displayName), LSTRING(dragAfterDeploy_description)],
_categoryArray, _categoryArray,
false, // default value false // default value
false, // isGlobal
{[QGVAR(dragAfterDeploy), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -5,9 +5,7 @@ private _category = [LELSTRING(common,categoryUncategorized), LLSTRING(setting_c
[LSTRING(setting_requireRopeItems_displayName)], [LSTRING(setting_requireRopeItems_displayName)],
_category, _category,
false, // default value false, // default value
true, // isGlobal true // isGlobal
{[QGVAR(requireRopeItems), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // needRestart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [

View File

@ -5,8 +5,8 @@
format ["ACE %1", LLSTRING(Module)], format ["ACE %1", LLSTRING(Module)],
false, false,
1, 1,
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QXGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -15,8 +15,7 @@
[LSTRING(Delay), LSTRING(DelayDesc)], [LSTRING(Delay), LSTRING(DelayDesc)],
format ["ACE %1", LLSTRING(Module)], format ["ACE %1", LLSTRING(Module)],
[0, 60, 15, -1], [0, 60, 15, -1],
1, 1
{[QGVAR(delay), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -26,8 +25,8 @@
format ["ACE %1", LLSTRING(Module)], format ["ACE %1", LLSTRING(Module)],
[[0, 1, 2], [ELSTRING(Common,Disabled), LSTRING(Instant), LSTRING(Delayed)], 0], [[0, 1, 2], [ELSTRING(Common,Disabled), LSTRING(Instant), LSTRING(Delayed)], 0],
1, 1,
{[QGVAR(delay), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QXGVAR(endMission), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -36,8 +35,7 @@
[LSTRING(Log), LSTRING(LogDesc)], [LSTRING(Log), LSTRING(LogDesc)],
format ["ACE %1", LLSTRING(Module)], format ["ACE %1", LLSTRING(Module)],
false, false,
1, 1
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -47,6 +45,6 @@
format ["ACE %1", LLSTRING(Module)], format ["ACE %1", LLSTRING(Module)],
[[0, 1, 2], [ELSTRING(Common,Disabled), LSTRING(TransferLoadoutCurrent), LSTRING(TransferLoadoutConfig)], 0], [[0, 1, 2], [ELSTRING(Common,Disabled), LSTRING(TransferLoadoutCurrent), LSTRING(TransferLoadoutConfig)], 0],
1, 1,
{}, {[QXGVAR(transferLoadout), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // needs mission restart true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -46,9 +46,7 @@ private _categoryColors = [_category, format ["| %1 |", LELSTRING(common,subcate
QGVAR(textSize), "LIST", QGVAR(textSize), "LIST",
LSTRING(textSize), LSTRING(textSize),
_category, _category,
[[0, 1, 2, 3, 4], ["str_very_small", "str_small", "str_medium", "str_large", "str_very_large"], 2], [[0, 1, 2, 3, 4], ["str_very_small", "str_small", "str_medium", "str_large", "str_very_large"], 2]
0,
{[QGVAR(textSize), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [

View File

@ -20,7 +20,7 @@
false, false,
true, true,
{[QGVAR(disableNegativeRating), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QGVAR(disableNegativeRating), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [

View File

@ -67,14 +67,11 @@
false, false,
true, true,
{ {
[QGVAR(BFT_Enabled), _this] call EFUNC(common,cbaSettings_settingChanged);
if (GVAR(BFT_Enabled) && {isNil QGVAR(BFT_markers)}) then { if (GVAR(BFT_Enabled) && {isNil QGVAR(BFT_markers)}) then {
GVAR(BFT_markers) = []; GVAR(BFT_markers) = [];
[LINKFUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; [LINKFUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler;
}; };
}, }
false
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -94,9 +91,7 @@
[localize LSTRING(BFT_ShowPlayerNames_DisplayName), localize LSTRING(BFT_ShowPlayerNames_Description)], [localize LSTRING(BFT_ShowPlayerNames_DisplayName), localize LSTRING(BFT_ShowPlayerNames_Description)],
[format ["ACE %1", localize LSTRING(Module_DisplayName)], localize LSTRING(BFT_Module_DisplayName)], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize LSTRING(BFT_Module_DisplayName)],
false, false,
true, true
{[QGVAR(BFT_ShowPlayerNames), _this] call EFUNC(common,cbaSettings_settingChanged)},
false
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -105,7 +100,5 @@
[localize LSTRING(BFT_HideAiGroups_DisplayName), localize LSTRING(BFT_HideAiGroups_Description)], [localize LSTRING(BFT_HideAiGroups_DisplayName), localize LSTRING(BFT_HideAiGroups_Description)],
[format ["ACE %1", localize LSTRING(Module_DisplayName)], localize LSTRING(BFT_Module_DisplayName)], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize LSTRING(BFT_Module_DisplayName)],
false, false,
true, true
{[QGVAR(BFT_HideAiGroups), _this] call EFUNC(common,cbaSettings_settingChanged)},
false
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -15,7 +15,5 @@ private _category = [LELSTRING(common,categoryUncategorized), LLSTRING(itemName)
[LSTRING(WaypointPrecision_DisplayName), LSTRING(WaypointPrecision_Description)], [LSTRING(WaypointPrecision_DisplayName), LSTRING(WaypointPrecision_Description)],
_category, _category,
[[1, 2, 3], [LSTRING(WaypointPrecision_medium), LSTRING(WaypointPrecision_close), LSTRING(WaypointPrecision_exact)], 2], // [values, titles, defaultIndex] [[1, 2, 3], [LSTRING(WaypointPrecision_medium), LSTRING(WaypointPrecision_close), LSTRING(WaypointPrecision_exact)], 2], // [values, titles, defaultIndex]
true, // isGlobal true // isGlobal
{[QGVAR(waypointPrecision), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // require mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -5,9 +5,7 @@ private _category = [LELSTRING(common,categoryUncategorized), localize "str_dn_p
"CHECKBOX", "CHECKBOX",
[LSTRING(HideAltimeter), LSTRING(HideAltimeter_tooltip)], [LSTRING(HideAltimeter), LSTRING(HideAltimeter_tooltip)],
_category, _category,
true, true
false,
{[QGVAR(hideAltimeter), _this, false] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [

View File

@ -7,7 +7,7 @@ private _category = [ELSTRING(main,Category_Logistics), LLSTRING(DisplayName)];
true, true,
true, true,
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -15,8 +15,7 @@ private _category = [ELSTRING(main,Category_Logistics), LLSTRING(DisplayName)];
[LSTRING(RearmSettings_level_DisplayName), LSTRING(RearmSettings_level_Description)], [LSTRING(RearmSettings_level_DisplayName), LSTRING(RearmSettings_level_Description)],
_category, _category,
[[0,1,2],[LSTRING(RearmSettings_vehicle), LSTRING(RearmSettings_magazine), LSTRING(RearmSettings_caliber)],0], // [values, titles, defaultIndex] [[0,1,2],[LSTRING(RearmSettings_vehicle), LSTRING(RearmSettings_magazine), LSTRING(RearmSettings_caliber)],0], // [values, titles, defaultIndex]
true, // isGlobal true // isGlobal
{[QGVAR(level), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -24,8 +23,7 @@ private _category = [ELSTRING(main,Category_Logistics), LLSTRING(DisplayName)];
[LSTRING(RearmSettings_supply_DisplayName), LSTRING(RearmSettings_supply_Description)], [LSTRING(RearmSettings_supply_DisplayName), LSTRING(RearmSettings_supply_Description)],
_category, _category,
[[0,1,2],[LSTRING(RearmSettings_unlimited), LSTRING(RearmSettings_limited), LSTRING(RearmSettings_magazineSupply)],0], // [values, titles, defaultIndex] [[0,1,2],[LSTRING(RearmSettings_unlimited), LSTRING(RearmSettings_limited), LSTRING(RearmSettings_magazineSupply)],0], // [values, titles, defaultIndex]
true, // isGlobal true // isGlobal
{[QGVAR(supply), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -33,6 +31,5 @@ private _category = [ELSTRING(main,Category_Logistics), LLSTRING(DisplayName)];
[LLSTRING(RearmSettings_distance_DisplayName), LLSTRING(RearmSettings_distance_Description)], [LLSTRING(RearmSettings_distance_DisplayName), LLSTRING(RearmSettings_distance_Description)],
_category, _category,
[10, 50, 20, 0], [10, 50, 20, 0],
true, // isGlobal true // isGlobal
{[QGVAR(supply), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -15,8 +15,7 @@ private _category = [ELSTRING(main,Category_Logistics), "str_state_refuel"];
[LSTRING(RefuelSettings_speed_DisplayName), LSTRING(RefuelSettings_speed_Description)], [LSTRING(RefuelSettings_speed_DisplayName), LSTRING(RefuelSettings_speed_Description)],
_category, _category,
[0,25,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] [0,25,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal true // isGlobal
{[QGVAR(rate), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -24,8 +23,7 @@ private _category = [ELSTRING(main,Category_Logistics), "str_state_refuel"];
[LSTRING(RefuelSettings_speedCargo_DisplayName), LSTRING(RefuelSettings_speedCargo_Description)], [LSTRING(RefuelSettings_speedCargo_DisplayName), LSTRING(RefuelSettings_speedCargo_Description)],
_category, _category,
[0,250,10,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] [0,250,10,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal true // isGlobal
{[QGVAR(cargoRate), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -33,8 +31,7 @@ private _category = [ELSTRING(main,Category_Logistics), "str_state_refuel"];
[LSTRING(RefuelSettings_hoseLength_DisplayName)], [LSTRING(RefuelSettings_hoseLength_DisplayName)],
_category, _category,
[0,50,12,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] [0,50,12,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal true // isGlobal
{[QGVAR(hoseLength), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -42,6 +39,5 @@ private _category = [ELSTRING(main,Category_Logistics), "str_state_refuel"];
[LSTRING(RefuelSettings_progressDuration_DisplayName), LSTRING(RefuelSettings_progressDuration_Description)], [LSTRING(RefuelSettings_progressDuration_DisplayName), LSTRING(RefuelSettings_progressDuration_Description)],
_category, _category,
[0, 10, 2], // [min, max, default value] [0, 10, 2], // [min, max, default value]
true, // isGlobal true // isGlobal
{[QGVAR(progressDuration), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -8,16 +8,14 @@ private _catFullRepair = [_category, LLSTRING(fullRepair)];
true, true,
true, true,
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
QGVAR(displayTextOnRepair), "CHECKBOX", QGVAR(displayTextOnRepair), "CHECKBOX",
[LSTRING(SettingDisplayTextName), LSTRING(SettingDisplayTextDesc)], [LSTRING(SettingDisplayTextName), LSTRING(SettingDisplayTextDesc)],
_category, _category,
true, // default value true // default value
false, // isGlobal
{[QGVAR(displayTextOnRepair), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -25,8 +23,7 @@ private _catFullRepair = [_category, LLSTRING(fullRepair)];
[LSTRING(engineerSetting_Repair_name), LSTRING(engineerSetting_Repair_description)], [LSTRING(engineerSetting_Repair_name), LSTRING(engineerSetting_Repair_description)],
_category, _category,
[[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],1], // [values, titles, defaultIndex] [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],1], // [values, titles, defaultIndex]
true, // isGlobal true // isGlobal
{[QGVAR(engineerSetting_repair), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -34,8 +31,7 @@ private _catFullRepair = [_category, LLSTRING(fullRepair)];
[LSTRING(engineerSetting_Wheel_name), LSTRING(engineerSetting_Wheel_description)], [LSTRING(engineerSetting_Wheel_name), LSTRING(engineerSetting_Wheel_description)],
_category, _category,
[[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],0], // [values, titles, defaultIndex] [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],0], // [values, titles, defaultIndex]
true, // isGlobal true // isGlobal
{[QGVAR(engineerSetting_wheel), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -69,8 +65,7 @@ private _catFullRepair = [_category, LLSTRING(fullRepair)];
[LSTRING(repairDamageThreshold_name), LSTRING(repairDamageThreshold_description)], [LSTRING(repairDamageThreshold_name), LSTRING(repairDamageThreshold_description)],
_category, _category,
[0, 1, 0.6, 1, true], [0, 1, 0.6, 1, true],
true, // isGlobal true // isGlobal
{[QGVAR(repairDamageThreshold), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -78,8 +73,7 @@ private _catFullRepair = [_category, LLSTRING(fullRepair)];
[LSTRING(repairDamageThreshold_Engineer_name), LSTRING(repairDamageThreshold_Engineer_description)], [LSTRING(repairDamageThreshold_Engineer_name), LSTRING(repairDamageThreshold_Engineer_description)],
_category, _category,
[0, 1, 0.4, 1, true], [0, 1, 0.4, 1, true],
true, // isGlobal true // isGlobal
{[QGVAR(repairDamageThreshold_engineer), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -87,8 +81,7 @@ private _catFullRepair = [_category, LLSTRING(fullRepair)];
[LSTRING(consumeItem_ToolKit_name), LSTRING(consumeItem_ToolKit_description)], [LSTRING(consumeItem_ToolKit_name), LSTRING(consumeItem_ToolKit_description)],
_category, _category,
[[0,1],[ELSTRING(common,No), ELSTRING(common,Yes)],0], // [values, titles, defaultIndex] [[0,1],[ELSTRING(common,No), ELSTRING(common,Yes)],0], // [values, titles, defaultIndex]
true, // isGlobal true // isGlobal
{[QGVAR(consumeItem_toolKit), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -105,8 +98,7 @@ private _catFullRepair = [_category, LLSTRING(fullRepair)];
[LSTRING(fullRepairLocation), LSTRING(fullRepairLocation_description)], [LSTRING(fullRepairLocation), LSTRING(fullRepairLocation_description)],
_catFullRepair, _catFullRepair,
[[0,1,2,3,4],[LSTRING(useAnywhere), LSTRING(repairVehicleOnly), LSTRING(repairFacilityOnly), LSTRING(vehicleAndFacility), ELSTRING(common,Disabled)],2], // [values, titles, defaultIndex] [[0,1,2,3,4],[LSTRING(useAnywhere), LSTRING(repairVehicleOnly), LSTRING(repairFacilityOnly), LSTRING(vehicleAndFacility), ELSTRING(common,Disabled)],2], // [values, titles, defaultIndex]
true, // isGlobal true // isGlobal
{[QGVAR(fullRepairLocation), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -114,8 +106,7 @@ private _catFullRepair = [_category, LLSTRING(fullRepair)];
[LSTRING(engineerSetting_fullRepair_name), LSTRING(engineerSetting_fullRepair_description)], [LSTRING(engineerSetting_fullRepair_name), LSTRING(engineerSetting_fullRepair_description)],
_catFullRepair, _catFullRepair,
[[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],2], // [values, titles, defaultIndex] [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],2], // [values, titles, defaultIndex]
true, // isGlobal true // isGlobal
{[QGVAR(engineerSetting_fullRepair), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -168,8 +159,7 @@ private _catFullRepair = [_category, LLSTRING(fullRepair)];
[LSTRING(autoShutOffEngineWhenStartingRepair_name), LSTRING(autoShutOffEngineWhenStartingRepair_description)], [LSTRING(autoShutOffEngineWhenStartingRepair_name), LSTRING(autoShutOffEngineWhenStartingRepair_description)],
_category, _category,
false, // default value false, // default value
true, // isGlobal true // isGlobal
{[QGVAR(autoShutOffEngineWhenStartingRepair), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [

View File

@ -6,5 +6,5 @@
true, true,
true, true,
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -4,8 +4,5 @@ private _category = [LELSTRING(common,categoryUncategorized), LLSTRING(Tagging)]
QGVAR(quickTag), "LIST", QGVAR(quickTag), "LIST",
[LLSTRING(QuickTag), LLSTRING(QuickTagDesc)], [LLSTRING(QuickTag), LLSTRING(QuickTagDesc)],
_category, _category,
[[0,1,2,3], [LELSTRING(Common,Disabled), LLSTRING(LastUsed), LLSTRING(RandomX), LLSTRING(Random)], 1], // [values, titles, defaultIndex] [[0,1,2,3], [LELSTRING(Common,Disabled), LLSTRING(LastUsed), LLSTRING(RandomX), LLSTRING(Random)], 1] // [values, titles, defaultIndex]
false, // isGlobal
{[QGVAR(quickTag), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -13,9 +13,7 @@
[LSTRING(removeAmmoAfterCookoff_setting_enable), LSTRING(removeAmmoAfterCookoff_setting_description)], [LSTRING(removeAmmoAfterCookoff_setting_enable), LSTRING(removeAmmoAfterCookoff_setting_description)],
LSTRING(category_displayName), LSTRING(category_displayName),
true, // default value true, // default value
true, // isGlobal true // isGlobal
{[QGVAR(removeAmmoDuringCookoff), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_settings_fnc_init; ] call CBA_settings_fnc_init;
[ [

View File

@ -3,8 +3,7 @@
[LSTRING(DefaultLockpickStrength_DisplayName), LSTRING(DefaultLockpickStrength_Description)], [LSTRING(DefaultLockpickStrength_DisplayName), LSTRING(DefaultLockpickStrength_Description)],
LSTRING(DisplayName), LSTRING(DisplayName),
[-1,60,10,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] [-1,60,10,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)]
true, // isGlobal true // isGlobal
{[QGVAR(defaultLockpickStrength), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [

View File

@ -6,7 +6,7 @@
[[0, 1, 2, 3], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson), LSTRING(Selective)], 0], [[0, 1, 2, 3], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson), LSTRING(Selective)], 0],
true, true,
{[QGVAR(mode), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QGVAR(mode), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -17,7 +17,7 @@
[[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0], [[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0],
true, true,
{[QGVAR(modeSelectiveFoot), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QGVAR(modeSelectiveFoot), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -28,7 +28,7 @@
[[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0], [[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0],
true, true,
{[QGVAR(modeSelectiveLand), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QGVAR(modeSelectiveLand), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -39,7 +39,7 @@
[[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0], [[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0],
true, true,
{[QGVAR(modeSelectiveAir), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QGVAR(modeSelectiveAir), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -50,7 +50,7 @@
[[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0], [[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0],
true, true,
{[QGVAR(modeSelectiveSea), _this] call EFUNC(common,cbaSettings_settingChanged)}, {[QGVAR(modeSelectiveSea), _this] call EFUNC(common,cbaSettings_settingChanged)},
true true // Needs mission restart
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [

View File

@ -3,9 +3,6 @@
"CHECKBOX", "CHECKBOX",
[ELSTRING(common,Enabled), LSTRING(KeybindDescription)], [ELSTRING(common,Enabled), LSTRING(KeybindDescription)],
format ["ACE %1", LLSTRING(Name)], format ["ACE %1", LLSTRING(Name)],
false,
false,
{[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)},
false false
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
@ -14,10 +11,7 @@
"LIST", "LIST",
[LSTRING(Reduction), LSTRING(ReductionDescription)], [LSTRING(Reduction), LSTRING(ReductionDescription)],
format ["ACE %1", LLSTRING(Name)], format ["ACE %1", LLSTRING(Name)],
[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"], 5], [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"], 5]
false,
{[QGVAR(reduction), _this] call EFUNC(common,cbaSettings_settingChanged)},
false
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -25,10 +19,7 @@
"LIST", "LIST",
[LSTRING(FadeDelay), LSTRING(FadeDelayDescription)], [LSTRING(FadeDelay), LSTRING(FadeDelayDescription)],
format ["ACE %1", LLSTRING(Name)], format ["ACE %1", LLSTRING(Name)],
[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], ["0s", "1s", "2s", "3s", "4s", "5s", "6s", "7s", "8s", "9s", "10s"], 1], [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], ["0s", "1s", "2s", "3s", "4s", "5s", "6s", "7s", "8s", "9s", "10s"], 1]
false,
{[QGVAR(fadeDelay), _this] call EFUNC(common,cbaSettings_settingChanged)},
false
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -36,9 +27,6 @@
"CHECKBOX", "CHECKBOX",
[LSTRING(LowerInVehicles), LSTRING(LowerInVehiclesDescription)], [LSTRING(LowerInVehicles), LSTRING(LowerInVehiclesDescription)],
format ["ACE %1", LLSTRING(Name)], format ["ACE %1", LLSTRING(Name)],
false,
false,
{[QGVAR(lowerInVehicles), _this] call EFUNC(common,cbaSettings_settingChanged)},
false false
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
@ -47,10 +35,7 @@
"CHECKBOX", "CHECKBOX",
[LSTRING(ShowNotification), LSTRING(ShowNotificationDescription)], [LSTRING(ShowNotification), LSTRING(ShowNotificationDescription)],
format ["ACE %1", LLSTRING(Name)], format ["ACE %1", LLSTRING(Name)],
true, true
false,
{[QGVAR(showNotification), _this] call EFUNC(common,cbaSettings_settingChanged)},
false
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;
[ [
@ -58,8 +43,5 @@
"CHECKBOX", "CHECKBOX",
[LSTRING(RemindIfLowered), LSTRING(RemindIfLoweredDescription)], [LSTRING(RemindIfLowered), LSTRING(RemindIfLoweredDescription)],
format ["ACE %1", LLSTRING(Name)], format ["ACE %1", LLSTRING(Name)],
false,
false,
{[QGVAR(remindIfLowered), _this] call EFUNC(common,cbaSettings_settingChanged)},
false false
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -2,7 +2,5 @@
QGVAR(displayText), "CHECKBOX", QGVAR(displayText), "CHECKBOX",
[LSTRING(SettingDisplayTextName), LSTRING(SettingDisplayTextDesc)], [LSTRING(SettingDisplayTextName), LSTRING(SettingDisplayTextDesc)],
ELSTRING(common,ACEKeybindCategoryWeapons), ELSTRING(common,ACEKeybindCategoryWeapons),
true, // default value true // default value
false, // isGlobal
{[QGVAR(displayText), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;

View File

@ -34,6 +34,5 @@ private _category = [format ["ACE %1", LLSTRING(Module_DisplayName)]];
QGVAR(showCheckAirTemperature), "CHECKBOX", QGVAR(showCheckAirTemperature), "CHECKBOX",
[LSTRING(showCheckAirTemperature_DisplayName), LELSTRING(common,showActionInSelfInteraction)], [LSTRING(showCheckAirTemperature_DisplayName), LELSTRING(common,showActionInSelfInteraction)],
_category, _category,
true, // default value true // default value
false // isGlobal
] call CBA_fnc_addSetting; ] call CBA_fnc_addSetting;