Feature: Setting to automatically restart server based on hours played (#11142)

This commit is contained in:
Tyler Trahan
2024-01-26 10:25:25 -05:00
committed by GitHub
parent 37fd69b604
commit 28716548d2
5 changed files with 75 additions and 25 deletions

View File

@@ -8,6 +8,7 @@
[pre-amble]
static void UpdateClientConfigValues();
void ChangeNetworkRestartTime(bool reset);
static constexpr std::initializer_list<const char*> _server_game_type{"local", "public", "invite-only"};
@@ -241,6 +242,16 @@ min = CalendarTime::MIN_YEAR
max = CalendarTime::MAX_YEAR
interval = 1
[SDTC_VAR]
var = network.restart_hours
type = SLE_UINT16
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_GUI_0_IS_SPECIAL | SF_NETWORK_ONLY
def = 0
min = 0
max = UINT16_MAX
interval = 1
post_cb = [](auto) { ChangeNetworkRestartTime(false); }
[SDTC_VAR]
var = network.min_active_clients
type = SLE_UINT8