diff options
author | Patric Stout <truebrain@openttd.org> | 2021-06-28 15:35:00 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-07-02 14:30:14 +0200 |
commit | a42251fc72d2196c26abfcc77c7fe0277798d3d4 (patch) | |
tree | 062c2687987f469c27af7d2ed3bd95e0d7dc4445 /src | |
parent | 9c7a7b53a192deef9dadf7f31d68c9a76cfaf35c (diff) | |
download | openttd-a42251fc72d2196c26abfcc77c7fe0277798d3d4.tar.xz |
Codechange: move network-related settings out of settings.ini
This to prepare the code to split up network-related settings
into private / secrets / generic.
Diffstat (limited to 'src')
-rw-r--r-- | src/settings.cpp | 43 | ||||
-rw-r--r-- | src/table/settings/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/table/settings/network_settings.ini | 331 | ||||
-rw-r--r-- | src/table/settings/settings.ini | 296 |
4 files changed, 365 insertions, 306 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index a7a50db11..71531b261 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -89,6 +89,21 @@ static ErrorList _settings_error_list; ///< Errors while loading minimal setting typedef span<const SettingVariant> SettingTable; +/** + * List of all the setting tables. + * + * There are a few tables that are special and not processed like the rest: + * - _currency_settings + * - _misc_settings + * - _company_settings + * - _win32_settings + * As such, they are not part of this list. + */ +static const SettingTable _setting_tables[] = { + _settings, + _network_settings, +}; + typedef void SettingDescProc(IniFile *ini, const SettingTable &desc, const char *grpname, void *object, bool only_startup); typedef void SettingDescProcList(IniFile *ini, const char *grpname, StringList &list); @@ -1542,7 +1557,11 @@ static void HandleSettingDescs(IniFile *ini, SettingDescProc *proc, SettingDescP proc(ini, _win32_settings, "win32", nullptr, only_startup); #endif /* _WIN32 */ - proc(ini, _settings, "patches", &_settings_newgame, only_startup); + for (auto &table : _setting_tables) { + /* The name "patches" is a fallback, as every setting should sets its own group. */ + proc(ini, table, "patches", &_settings_newgame, only_startup); + } + proc(ini, _currency_settings,"currency", &_custom_currency, only_startup); proc(ini, _company_settings, "company", &_settings_client.company, only_startup); @@ -1773,8 +1792,10 @@ static const SettingDesc *GetCompanySettingFromName(std::string_view name) */ const SettingDesc *GetSettingFromName(const std::string_view name) { - auto sd = GetSettingFromName(name, _settings); - if (sd != nullptr) return sd; + for (auto &table : _setting_tables) { + auto sd = GetSettingFromName(name, table); + if (sd != nullptr) return sd; + } return GetCompanySettingFromName(name); } @@ -2016,13 +2037,15 @@ void IConsoleListSettings(const char *prefilter) { IConsolePrint(CC_HELP, "All settings with their current value:"); - for (auto &desc : _settings) { - const SettingDesc *sd = GetSettingDesc(desc); - if (!SlIsObjectCurrentlyValid(sd->save.version_from, sd->save.version_to)) continue; - if (prefilter != nullptr && sd->name.find(prefilter) == std::string::npos) continue; - char value[80]; - sd->FormatValue(value, lastof(value), &GetGameSettings()); - IConsolePrint(CC_DEFAULT, "{} = {}", sd->name, value); + for (auto &table : _setting_tables) { + for (auto &desc : table) { + const SettingDesc *sd = GetSettingDesc(desc); + if (!SlIsObjectCurrentlyValid(sd->save.version_from, sd->save.version_to)) continue; + if (prefilter != nullptr && sd->name.find(prefilter) == std::string::npos) continue; + char value[80]; + sd->FormatValue(value, lastof(value), &GetGameSettings()); + IConsolePrint(CC_DEFAULT, "{} = {}", sd->name, value); + } } IConsolePrint(CC_HELP, "Use 'setting' command to change a value."); diff --git a/src/table/settings/CMakeLists.txt b/src/table/settings/CMakeLists.txt index b1503145f..802b6b42d 100644 --- a/src/table/settings/CMakeLists.txt +++ b/src/table/settings/CMakeLists.txt @@ -6,6 +6,7 @@ set(TABLE_INI_SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/currency_settings.ini ${CMAKE_CURRENT_SOURCE_DIR}/gameopt_settings.ini ${CMAKE_CURRENT_SOURCE_DIR}/misc_settings.ini + ${CMAKE_CURRENT_SOURCE_DIR}/network_settings.ini ${CMAKE_CURRENT_SOURCE_DIR}/settings.ini ${CMAKE_CURRENT_SOURCE_DIR}/win32_settings.ini ${CMAKE_CURRENT_SOURCE_DIR}/window_settings.ini diff --git a/src/table/settings/network_settings.ini b/src/table/settings/network_settings.ini new file mode 100644 index 000000000..5d33773c8 --- /dev/null +++ b/src/table/settings/network_settings.ini @@ -0,0 +1,331 @@ +; This file is part of OpenTTD. +; OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. +; OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +; See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>. +; + +; Network settings as stored in the main configuration file ("openttd.cfg"). + +[pre-amble] +static bool ReplaceAsteriskWithEmptyPassword(std::string &newval); +static void UpdateClientConfigValues(); + +static const SettingVariant _network_settings[] = { +[post-amble] +}; +[templates] +SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup), +SDTC_SSTR = SDTC_SSTR( $var, $type, $flags, $def, $length, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup), +SDTC_VAR = SDTC_VAR( $var, $type, $flags, $def, $min, $max, $interval, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup), + +[validation] +SDTC_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size"); + +[defaults] +flags = SF_NONE +interval = 0 +str = STR_NULL +strhelp = STR_CONFIG_SETTING_NO_EXPLANATION_AVAILABLE_HELPTEXT +strval = STR_NULL +pre_cb = nullptr +post_cb = nullptr +load = nullptr +from = SL_MIN_VERSION +to = SL_MAX_VERSION +cat = SC_ADVANCED +extra = 0 +startup = false + + +[SDTC_VAR] +var = network.sync_freq +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NOT_IN_CONFIG | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 100 +min = 0 +max = 100 +cat = SC_EXPERT + +[SDTC_VAR] +var = network.frame_freq +type = SLE_UINT8 +flags = SF_NOT_IN_SAVE | SF_NOT_IN_CONFIG | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 0 +min = 0 +max = 100 +cat = SC_EXPERT + +[SDTC_VAR] +var = network.commands_per_frame +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 2 +min = 1 +max = 65535 +cat = SC_EXPERT + +[SDTC_VAR] +var = network.max_commands_in_queue +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 16 +min = 1 +max = 65535 +cat = SC_EXPERT + +[SDTC_VAR] +var = network.bytes_per_frame +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 8 +min = 1 +max = 65535 +cat = SC_EXPERT + +[SDTC_VAR] +var = network.bytes_per_frame_burst +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 256 +min = 1 +max = 65535 +cat = SC_EXPERT + +[SDTC_VAR] +var = network.max_init_time +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 100 +min = 0 +max = 32000 +cat = SC_EXPERT + +[SDTC_VAR] +var = network.max_join_time +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 500 +min = 0 +max = 32000 + +[SDTC_VAR] +var = network.max_download_time +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 1000 +min = 0 +max = 32000 + +[SDTC_VAR] +var = network.max_password_time +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 2000 +min = 0 +max = 32000 + +[SDTC_VAR] +var = network.max_lag_time +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 500 +min = 0 +max = 32000 + +[SDTC_BOOL] +var = network.pause_on_join +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = true + +[SDTC_VAR] +var = network.server_port +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = NETWORK_DEFAULT_PORT +min = 0 +max = 65535 +cat = SC_EXPERT + +[SDTC_VAR] +var = network.server_admin_port +type = SLE_UINT16 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = NETWORK_ADMIN_PORT +min = 0 +max = 65535 +cat = SC_EXPERT + +[SDTC_BOOL] +var = network.server_admin_chat +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = true +cat = SC_EXPERT + +[SDTC_BOOL] +var = network.server_advertise +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = false + +[SDTC_SSTR] +var = network.client_name +type = SLE_STR +length = NETWORK_CLIENT_NAME_LENGTH +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC +def = nullptr +pre_cb = NetworkValidateClientName +post_cb = NetworkUpdateClientName +cat = SC_BASIC + +[SDTC_SSTR] +var = network.server_password +type = SLE_STR +length = NETWORK_PASSWORD_LENGTH +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = nullptr +pre_cb = ReplaceAsteriskWithEmptyPassword +post_cb = [](auto) { NetworkServerUpdateGameInfo(); } +cat = SC_BASIC + +[SDTC_SSTR] +var = network.rcon_password +type = SLE_STR +length = NETWORK_PASSWORD_LENGTH +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = nullptr +pre_cb = ReplaceAsteriskWithEmptyPassword +cat = SC_BASIC + +[SDTC_SSTR] +var = network.admin_password +type = SLE_STR +length = NETWORK_PASSWORD_LENGTH +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = nullptr +cat = SC_BASIC + +[SDTC_SSTR] +var = network.default_company_pass +type = SLE_STR +length = NETWORK_PASSWORD_LENGTH +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC +def = nullptr + +[SDTC_SSTR] +var = network.server_name +type = SLE_STR +length = NETWORK_NAME_LENGTH +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = nullptr +pre_cb = NetworkValidateServerName +post_cb = [](auto) { UpdateClientConfigValues(); } +cat = SC_BASIC + +[SDTC_SSTR] +var = network.connect_to_ip +type = SLE_STR +length = 0 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC +def = nullptr + +[SDTC_SSTR] +var = network.network_id +type = SLE_STR +length = NETWORK_SERVER_ID_LENGTH +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = nullptr + +[SDTC_BOOL] +var = network.autoclean_companies +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = false + +[SDTC_VAR] +var = network.autoclean_unprotected +type = SLE_UINT8 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY +def = 12 +min = 0 +max = 240 + +[SDTC_VAR] +var = network.autoclean_protected +type = SLE_UINT8 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY +def = 36 +min = 0 +max = 240 + +[SDTC_VAR] +var = network.autoclean_novehicles +type = SLE_UINT8 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY +def = 0 +min = 0 +max = 240 + +[SDTC_VAR] +var = network.max_companies +type = SLE_UINT8 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 15 +min = 1 +max = MAX_COMPANIES +post_cb = [](auto) { UpdateClientConfigValues(); } +cat = SC_BASIC + +[SDTC_VAR] +var = network.max_clients +type = SLE_UINT8 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 25 +min = 2 +max = MAX_CLIENTS +post_cb = [](auto) { UpdateClientConfigValues(); } +cat = SC_BASIC + +[SDTC_VAR] +var = network.max_spectators +type = SLE_UINT8 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 15 +min = 0 +max = MAX_CLIENTS +post_cb = [](auto) { UpdateClientConfigValues(); } +cat = SC_BASIC + +[SDTC_VAR] +var = network.restart_game_year +type = SLE_INT32 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY +def = 0 +min = MIN_YEAR +max = MAX_YEAR +interval = 1 + +[SDTC_VAR] +var = network.min_active_clients +type = SLE_UINT8 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = 0 +min = 0 +max = MAX_CLIENTS + +[SDTC_BOOL] +var = network.reload_cfg +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY +def = false +cat = SC_EXPERT + +[SDTC_SSTR] +var = network.last_joined +type = SLE_STR +length = 0 +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC +def = """" +cat = SC_EXPERT + +[SDTC_BOOL] +var = network.no_http_content_downloads +flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC +def = false +cat = SC_EXPERT diff --git a/src/table/settings/settings.ini b/src/table/settings/settings.ini index 5e352ff3c..601493a7e 100644 --- a/src/table/settings/settings.ini +++ b/src/table/settings/settings.ini @@ -35,9 +35,6 @@ static void SpriteZoomMinChanged(int32 new_value); static void MaxVehiclesChanged(int32 new_value); static void InvalidateShipPathCache(int32 new_value); -static bool ReplaceAsteriskWithEmptyPassword(std::string &newval); -static void UpdateClientConfigValues(); - /* End - Callback Functions for the various settings */ /* Some settings do not need to be synchronised when playing in multiplayer. @@ -3550,296 +3547,3 @@ def = 20 min = 1 max = 65535 cat = SC_EXPERT - -[SDTC_VAR] -var = network.sync_freq -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NOT_IN_CONFIG | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 100 -min = 0 -max = 100 -cat = SC_EXPERT - -[SDTC_VAR] -var = network.frame_freq -type = SLE_UINT8 -flags = SF_NOT_IN_SAVE | SF_NOT_IN_CONFIG | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 0 -min = 0 -max = 100 -cat = SC_EXPERT - -[SDTC_VAR] -var = network.commands_per_frame -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 2 -min = 1 -max = 65535 -cat = SC_EXPERT - -[SDTC_VAR] -var = network.max_commands_in_queue -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 16 -min = 1 -max = 65535 -cat = SC_EXPERT - -[SDTC_VAR] -var = network.bytes_per_frame -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 8 -min = 1 -max = 65535 -cat = SC_EXPERT - -[SDTC_VAR] -var = network.bytes_per_frame_burst -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 256 -min = 1 -max = 65535 -cat = SC_EXPERT - -[SDTC_VAR] -var = network.max_init_time -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 100 -min = 0 -max = 32000 -cat = SC_EXPERT - -[SDTC_VAR] -var = network.max_join_time -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 500 -min = 0 -max = 32000 - -[SDTC_VAR] -var = network.max_download_time -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 1000 -min = 0 -max = 32000 - -[SDTC_VAR] -var = network.max_password_time -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 2000 -min = 0 -max = 32000 - -[SDTC_VAR] -var = network.max_lag_time -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 500 -min = 0 -max = 32000 - -[SDTC_BOOL] -var = network.pause_on_join -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = true - -[SDTC_VAR] -var = network.server_port -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = NETWORK_DEFAULT_PORT -min = 0 -max = 65535 -cat = SC_EXPERT - -[SDTC_VAR] -var = network.server_admin_port -type = SLE_UINT16 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = NETWORK_ADMIN_PORT -min = 0 -max = 65535 -cat = SC_EXPERT - -[SDTC_BOOL] -var = network.server_admin_chat -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = true -cat = SC_EXPERT - -[SDTC_BOOL] -var = network.server_advertise -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = false - -[SDTC_SSTR] -var = network.client_name -type = SLE_STR -length = NETWORK_CLIENT_NAME_LENGTH -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC -def = nullptr -pre_cb = NetworkValidateClientName -post_cb = NetworkUpdateClientName -cat = SC_BASIC - -[SDTC_SSTR] -var = network.server_password -type = SLE_STR -length = NETWORK_PASSWORD_LENGTH -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = nullptr -pre_cb = ReplaceAsteriskWithEmptyPassword -post_cb = [](auto) { NetworkServerUpdateGameInfo(); } -cat = SC_BASIC - -[SDTC_SSTR] -var = network.rcon_password -type = SLE_STR -length = NETWORK_PASSWORD_LENGTH -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = nullptr -pre_cb = ReplaceAsteriskWithEmptyPassword -cat = SC_BASIC - -[SDTC_SSTR] -var = network.admin_password -type = SLE_STR -length = NETWORK_PASSWORD_LENGTH -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = nullptr -cat = SC_BASIC - -[SDTC_SSTR] -var = network.default_company_pass -type = SLE_STR -length = NETWORK_PASSWORD_LENGTH -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC -def = nullptr - -[SDTC_SSTR] -var = network.server_name -type = SLE_STR -length = NETWORK_NAME_LENGTH -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = nullptr -pre_cb = NetworkValidateServerName -post_cb = [](auto) { UpdateClientConfigValues(); } -cat = SC_BASIC - -[SDTC_SSTR] -var = network.connect_to_ip -type = SLE_STR -length = 0 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC -def = nullptr - -[SDTC_SSTR] -var = network.network_id -type = SLE_STR -length = NETWORK_SERVER_ID_LENGTH -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = nullptr - -[SDTC_BOOL] -var = network.autoclean_companies -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = false - -[SDTC_VAR] -var = network.autoclean_unprotected -type = SLE_UINT8 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY -def = 12 -min = 0 -max = 240 - -[SDTC_VAR] -var = network.autoclean_protected -type = SLE_UINT8 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY -def = 36 -min = 0 -max = 240 - -[SDTC_VAR] -var = network.autoclean_novehicles -type = SLE_UINT8 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY -def = 0 -min = 0 -max = 240 - -[SDTC_VAR] -var = network.max_companies -type = SLE_UINT8 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 15 -min = 1 -max = MAX_COMPANIES -post_cb = [](auto) { UpdateClientConfigValues(); } -cat = SC_BASIC - -[SDTC_VAR] -var = network.max_clients -type = SLE_UINT8 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 25 -min = 2 -max = MAX_CLIENTS -post_cb = [](auto) { UpdateClientConfigValues(); } -cat = SC_BASIC - -[SDTC_VAR] -var = network.max_spectators -type = SLE_UINT8 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 15 -min = 0 -max = MAX_CLIENTS -post_cb = [](auto) { UpdateClientConfigValues(); } -cat = SC_BASIC - -[SDTC_VAR] -var = network.restart_game_year -type = SLE_INT32 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY -def = 0 -min = MIN_YEAR -max = MAX_YEAR -interval = 1 - -[SDTC_VAR] -var = network.min_active_clients -type = SLE_UINT8 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = 0 -min = 0 -max = MAX_CLIENTS - -[SDTC_BOOL] -var = network.reload_cfg -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = false -cat = SC_EXPERT - -[SDTC_SSTR] -var = network.last_joined -type = SLE_STR -length = 0 -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC -def = """" -cat = SC_EXPERT - -[SDTC_BOOL] -var = network.no_http_content_downloads -flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC -def = false -cat = SC_EXPERT |