New game from the panel instead of an uploaded save (2.9.3)

World & Backups -> Start new game (console: new-game, also when stopped):
the save is backed up and replaced by a new-game marker (also as reset
point). Joining players are told to start a new game; the server pulls the
first player's save and from then on runs normally. Reset world returns to
a new game when the reset point is one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 17:36:33 +02:00
co-authored by Claude Opus 5.5
parent 06a58e08d5
commit e94123fa40
9 changed files with 174 additions and 11 deletions
+3 -2
View File
@@ -306,7 +306,7 @@ public sealed class ServerHost
if (!server.LoadSave())
return Fail(SaveStore.HasSave(dataDir)
? "The save game could not be loaded - see the console"
: "No save game yet - upload one as ZIP in the panel (World & Backups) or copy it to data/save");
: "No save game yet - upload one as ZIP in the panel (World & Backups), start a new game there or copy it to data/save");
server.Panel = Panel;
server.Host = this;
server.LicenseConfirmedUtc = confirmed;
@@ -369,7 +369,8 @@ public sealed class ServerHost
resetPoint = SaveStore.HasResetPoint(dataDir)
? File.GetLastWriteTimeUtc(Path.Combine(SaveStore.OriginalPath(dataDir), "defaultES2File.txt")).ToString("o") : null,
saveSyncMinutes = Config.SaveSyncMinutes,
hasSave = SaveStore.HasSave(dataDir),
hasSave = SaveStore.HasSave(dataDir) || SaveStore.IsNewGame(dataDir),
newGame = SaveStore.IsNewGame(dataDir),
hasLicenseKey = !string.IsNullOrWhiteSpace(Config.LicenseKey)
};