Show why you were disconnected in the main menu; reset-world / reload-save make all players reconnect automatically

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-27 10:46:45 +02:00
co-authored by Claude Opus 5.5
parent 85fbb8a3ce
commit 08844b18ac
4 changed files with 37 additions and 5 deletions
+9
View File
@@ -153,6 +153,15 @@ try
Check(unbanned.Welcome != null, "After unban the player can join again");
unbanned.Close();
watcher.Close();
await Task.Delay(300);
Console.WriteLine("== reset-world makes everyone reconnect");
var r1 = await TestClient.Join("Resetter", 0, null);
server.EnqueueCommand("reset-world");
var rec = await r1.WaitFor(MsgType.Reconnect);
Check(rec != null && new BinaryReader(new MemoryStream(rec)).ReadString().Contains("reset"), "Players get the 'world is being reset' reconnect message");
await Task.Delay(300);
Check(r1.IsClosedByServer(), "Their connection is closed so they load the fresh world");
}
catch (Exception e)
{