Add CitiesLimitFix into sFall config with default=true

This commit is contained in:
Vasilii Rogin 2024-04-18 22:51:45 +03:00
parent ec0685ea19
commit 252d7fe83e
2 changed files with 7 additions and 1 deletions

View File

@ -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);

View File

@ -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