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

@@ -34,6 +34,7 @@
#include "console_func.h"
#include "screenshot.h"
#include "network/network.h"
#include "network/network_server.h"
#include "network/network_func.h"
#include "ai/ai.hpp"
#include "ai/ai_config.hpp"
@@ -917,7 +918,11 @@ static void MakeNewGameDone()
CheckIndustries();
MarkWholeScreenDirty();
if (_network_server && !_network_dedicated) ShowClientList();
if (_network_server) {
ChangeNetworkRestartTime(true);
if (!_network_dedicated) ShowClientList();
}
}
static void MakeNewGame(bool from_heightmap, bool reset_settings)