Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General - Switch to CBA_fnc_addSetting #8099

Merged
merged 1 commit into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions addons/advanced_fatigue/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)
},
true // Needs mission restart
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(enableStaminaBar),
Expand All @@ -28,7 +28,7 @@
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(fadeStaminaBar),
Expand All @@ -43,7 +43,7 @@
_staminaBarContainer ctrlCommit 0;
};
}
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(performanceFactor),
Expand All @@ -52,7 +52,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(recoveryFactor),
Expand All @@ -61,7 +61,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(loadFactor),
Expand All @@ -70,7 +70,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(terrainGradientFactor),
Expand All @@ -79,7 +79,7 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(swayFactor),
Expand All @@ -88,4 +88,4 @@
LSTRING(DisplayName),
[0, 5, 1, 1],
true
] call CBA_Settings_fnc_init;
] call CBA_fnc_addSetting;
14 changes: 7 additions & 7 deletions addons/arsenal/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ PREP_RECOMPILE_START;
PREP_RECOMPILE_END;

// Arsenal
[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_Settings_fnc_init;
[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init;
[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_Settings_fnc_init;
[QGVAR(enableIdentityTabs), "CHECKBOX", localize LSTRING(enableIdentityTabsSettings), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_fnc_addSetting;
[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_fnc_addSetting;
[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_fnc_addSetting;
[QGVAR(enableIdentityTabs), "CHECKBOX", localize LSTRING(enableIdentityTabsSettings), localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting;

// Arsenal loadouts
[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init;
[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], localize LSTRING(settingCategory), false, false] call CBA_Settings_fnc_init;
[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting;
[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting;
[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], localize LSTRING(settingCategory), false, false] call CBA_fnc_addSetting;

[QGVAR(statsToggle), {
params ["_display", "_showStats"];
Expand Down
4 changes: 2 additions & 2 deletions addons/artillerytables/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"
true, // isGlobal
{[QGVAR(advancedCorrections), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(disableArtilleryComputer), "CHECKBOX",
Expand All @@ -20,4 +20,4 @@ private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"
true, // isGlobal
{[QGVAR(disableArtilleryComputer), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
6 changes: 3 additions & 3 deletions addons/cargo/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
true,
true,
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(loadTimeCoefficient), "SLIDER",
Expand All @@ -14,7 +14,7 @@
[0, 10, 5, 1],
true,
{[QGVAR(loadTimeCoefficient), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(paradropTimeCoefficent), "SLIDER",
Expand All @@ -23,4 +23,4 @@
[0, 10, 2.5, 1],
true,
{[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)}
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_cbaSettings_convertHelper.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x
_output pushBack format [" {[""%1"", _this] call ace_common_fnc_cbaSettings_settingChanged},", _varName];
};
_output pushBack format [" %1 // Needs mission restart", _warnIfChangedMidMission];
_output pushBack "] call CBA_settings_fnc_init;";
_output pushBack "] call CBA_fnc_addSetting;";
} forEach _settings;

copyToClipboard (_output joinString endl);
Expand Down
2 changes: 1 addition & 1 deletion addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private _code = compile format ['["%1", _this] call FUNC(cbaSettings_settingChan

TRACE_2("setting",_cbaSettingType,_cbaValueInfo);
TRACE_4("",_isForced,_cbaIsGlobal,_category,_cbaValueInfo);
private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code, _warnIfChangedMidMission] call CBA_settings_fnc_init;
private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code, _warnIfChangedMidMission] call CBA_fnc_addSetting;
TRACE_1("returned",_return);
if ((isNil "_return") || {_return != 0}) then {ERROR_1("Setting [%1] - CBA Error",_varName);};
_return
Expand Down
4 changes: 2 additions & 2 deletions addons/common/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
false,
false,
LINKFUNC(switchPersistentLaser)
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(allowFadeMusic),
Expand All @@ -15,4 +15,4 @@
localize LSTRING(ACEKeybindCategoryCommon),
true,
true
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
10 changes: 5 additions & 5 deletions addons/cookoff/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
true, // isGlobal
{[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(enableAmmobox), "CHECKBOX",
Expand All @@ -18,7 +18,7 @@
true, // isGlobal
{[QGVAR(enableAmmobox), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(enableAmmoCookoff), "CHECKBOX",
Expand All @@ -28,7 +28,7 @@
true, // isGlobal
{[QGVAR(enableAmmoCookoff), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(ammoCookoffDuration), "SLIDER",
Expand All @@ -38,7 +38,7 @@
true, // isGlobal
{[QGVAR(ammoCookoffDuration), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(probabilityCoef), "SLIDER",
Expand All @@ -48,4 +48,4 @@
true, // isGlobal
{[QGVAR(probabilityCoef), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
10 changes: 5 additions & 5 deletions addons/csw/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]];
true, // isGlobal
{[QGVAR(defaultAssemblyMode), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(handleExtraMagazines), "CHECKBOX",
Expand All @@ -20,7 +20,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]];
true, // isGlobal
{[QGVAR(handleExtraMagazines), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(ammoHandling), "LIST",
Expand All @@ -30,7 +30,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]];
true, // isGlobal
{[QGVAR(ammoHandling), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(progressBarTimeCoefficent), "SLIDER",
Expand All @@ -40,7 +40,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]];
true, // isGlobal
{[QGVAR(progressBarTimeCoefficent), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(dragAfterDeploy), "CHECKBOX",
Expand All @@ -50,4 +50,4 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]];
false, // isGlobal
{[QGVAR(dragAfterDeploy), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
2 changes: 1 addition & 1 deletion addons/fastroping/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ private _category = ["ACE Uncategorized", LLSTRING(setting_categoryMenu_displayN
true, // isGlobal
{[QGVAR(requireRopeItems), _this] call EFUNC(common,cbaSettings_settingChanged)},
false // needRestart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
18 changes: 9 additions & 9 deletions addons/interact_menu/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[1, 0, 0],
false,
{GVAR(selectorColorHex) = _this call BIS_fnc_colorRGBtoHTML} // Stored in Hex to avoid constant conversion
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(consolidateSingleChild),
Expand All @@ -23,7 +23,7 @@
[format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)],
false,
false
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(cursorKeepCentered),
Expand All @@ -32,7 +32,7 @@
[format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)],
false,
false
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(useListMenu),
Expand All @@ -41,7 +41,7 @@
[format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)],
false,
false
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(menuBackground),
Expand All @@ -50,7 +50,7 @@
[format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)],
[[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", LLSTRING(backgroundBlur), LLSTRING(backgroundBlack)], 0],
false
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(alwaysUseCursorSelfInteraction),
Expand All @@ -59,7 +59,7 @@
[format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)],
true,
false
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(cursorKeepCenteredSelfInteraction),
Expand All @@ -68,7 +68,7 @@
[format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)],
false,
false
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(useListMenuSelf),
Expand All @@ -77,7 +77,7 @@
[format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)],
false,
false
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(menuBackgroundSelf),
Expand All @@ -86,4 +86,4 @@
[format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)],
[[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", LLSTRING(backgroundBlur), LLSTRING(backgroundBlack)], 0],
false
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
2 changes: 1 addition & 1 deletion addons/markers/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ private _categoryName = format ["ACE %1", localize ELSTRING(map,Module_DisplayNa
],
1
]
] call cba_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(timestampEnabled), "CHECKBOX",
Expand Down
10 changes: 5 additions & 5 deletions addons/medical/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
true,
{},
true
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(fractures),
Expand All @@ -18,7 +18,7 @@
true,
{},
true
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(fractureChance),
Expand All @@ -27,7 +27,7 @@
LSTRING(Category),
[0, 1, 0.8, 2, true],
true
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(spontaneousWakeUpChance),
Expand All @@ -36,7 +36,7 @@
LSTRING(Category),
[0, 1, 0.05, 2, true],
true
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;

[
QGVAR(spontaneousWakeUpEpinephrineBoost),
Expand All @@ -45,4 +45,4 @@
LSTRING(Category),
[1, 30, 1, 1],
true
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
2 changes: 1 addition & 1 deletion addons/medical_ai/initSettings.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ private _categoryArray = [ELSTRING(medical,Category), "STR_TEAM_SWITCH_AI"];
true, // isGlobal
{[QGVAR(enabledFor), _this] call EFUNC(common,cbaSettings_settingChanged)},
true // Needs mission restart
] call CBA_settings_fnc_init;
] call CBA_fnc_addSetting;
Loading