Refuse newer save formats and add a gated dump of a live school.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 00:30:39 +03:00
co-authored by Cursor
parent 0ae633995f
commit a7955a0dce
13 changed files with 479 additions and 11 deletions
@@ -179,6 +179,10 @@ internal sealed class GameLoopService(
HandleWorkerFailed(failed.SchoolId);
break;
case GameCommand.DumpSchool dump:
HandleDump(dump);
break;
case GameCommand.GetPerson getPerson:
HandleGetPerson(getPerson);
break;
@@ -220,6 +224,15 @@ internal sealed class GameLoopService(
}
}
private void HandleDump(GameCommand.DumpSchool command)
{
if (!_workers.TryGetValue(command.SchoolId, out var worker)
|| !worker.Post(new WorkerCommand.Dump(command.Result)))
{
command.Result.TrySetResult(null);
}
}
private void HandleGetPerson(GameCommand.GetPerson command)
{
if (!_workers.TryGetValue(command.SchoolId, out var worker)