diff options
Diffstat (limited to 'src/table/settings/network_settings.ini')
-rw-r--r-- | src/table/settings/network_settings.ini | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/table/settings/network_settings.ini b/src/table/settings/network_settings.ini index 45459b6e1..552f58823 100644 --- a/src/table/settings/network_settings.ini +++ b/src/table/settings/network_settings.ini @@ -9,14 +9,18 @@ [pre-amble] static void UpdateClientConfigValues(); +static std::initializer_list<const char*> _server_game_type{"local", "public", "invite-only"}; + static const SettingVariant _network_settings_table[] = { [post-amble] }; [templates] SDTC_BOOL = SDTC_BOOL( $var, $flags, $def, $str, $strhelp, $strval, $pre_cb, $post_cb, $from, $to, $cat, $extra, $startup), +SDTC_OMANY = SDTC_OMANY( $var, $type, $flags, $def, $max, $full, $str, $strhelp, $strval, $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_OMANY = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size"); SDTC_VAR = static_assert($max <= MAX_$type, "Maximum value for $var exceeds storage size"); [defaults] @@ -159,10 +163,16 @@ flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY def = true cat = SC_EXPERT -[SDTC_BOOL] -var = network.server_advertise +[SDTC_OMANY] +var = network.server_game_type +type = SLE_UINT8 flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY -def = false +def = SERVER_GAME_TYPE_LOCAL +min = SERVER_GAME_TYPE_LOCAL +max = SERVER_GAME_TYPE_INVITE_ONLY +full = _server_game_type +post_cb = [](auto) { NetworkUpdateServerGameType(); } +cat = SC_BASIC [SDTC_BOOL] var = network.autoclean_companies |