From 252d7fe83e63084c2492136a7c17fd4f826b9b3c Mon Sep 17 00:00:00 2001 From: Vasilii Rogin Date: Thu, 18 Apr 2024 22:51:45 +0300 Subject: [PATCH] Add CitiesLimitFix into sFall config with default=true --- src/sfall_config.cc | 6 +++++- src/sfall_config.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sfall_config.cc b/src/sfall_config.cc index f368905..027f2b8 100644 --- a/src/sfall_config.cc +++ b/src/sfall_config.cc @@ -61,6 +61,7 @@ bool sfallConfigInit(int argc, char** argv) configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_VERSION_STRING, ""); configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_CONFIG_FILE, ""); configSetString(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_PATCH_FILE, ""); + configSetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_CITIES_LIMIT_FIX, true); configSetString(&gSfallConfig, SFALL_CONFIG_SCRIPTS_KEY, SFALL_CONFIG_INI_CONFIG_FOLDER, ""); configSetString(&gSfallConfig, SFALL_CONFIG_SCRIPTS_KEY, SFALL_CONFIG_GLOBAL_SCRIPT_PATHS, ""); @@ -76,7 +77,10 @@ bool sfallConfigInit(int argc, char** argv) strcpy(path, SFALL_CONFIG_FILE_NAME); } - configRead(&gSfallConfig, path, false); + bool isSfallConfigExists = configRead(&gSfallConfig, path, false); + if (!isSfallConfigExists){ + configSetBool(&gSfallConfig, SFALL_CONFIG_MISC_KEY, SFALL_CONFIG_CITIES_LIMIT_FIX, false); + } configParseCommandLineArguments(&gSfallConfig, argc, argv); diff --git a/src/sfall_config.h b/src/sfall_config.h index 7d4b2fb..4de30ed 100644 --- a/src/sfall_config.h +++ b/src/sfall_config.h @@ -75,6 +75,8 @@ namespace fallout { #define SFALL_CONFIG_VERSION_STRING "VersionString" #define SFALL_CONFIG_CONFIG_FILE "ConfigFile" #define SFALL_CONFIG_PATCH_FILE "PatchFile" +#define SFALL_CONFIG_CITIES_LIMIT_FIX "CitiesLimitFix" + #define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_MULTIPLIER 1 #define SFALL_CONFIG_BURST_MOD_DEFAULT_CENTER_DIVISOR 3