Merge phase 26 school seed.
ci / server (push) Failing after 3m34s
ci / client (push) Failing after 12s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-20 00:43:33 +03:00
co-authored by Cursor
18 changed files with 237 additions and 35 deletions
+7 -3
View File
@@ -378,9 +378,10 @@ internal sealed class GameLoopService(
var id = _nextId++;
store.WriteNextId(_nextId);
var nativeLanguage = NativeLanguages.Pick(names, id, command.NativeLanguage, rollIfOmitted: true);
var seed = command.Seed ?? Random.Shared.Next();
var nativeLanguage = NativeLanguages.Pick(names, seed, command.NativeLanguage, rollIfOmitted: true);
var worker = SpawnWorker(id, normalized, command.StartDate, running: true, ClockSpeed.DefaultIndex, isNew: true, packIds, command.Map, nameSetId, nativeLanguage);
var worker = SpawnWorker(id, normalized, command.StartDate, running: true, ClockSpeed.DefaultIndex, isNew: true, packIds, command.Map, nameSetId, nativeLanguage, seed);
Track(worker);
worker.Start();
@@ -402,7 +403,7 @@ internal sealed class GameLoopService(
throw;
}
logger.LogInformation("School {SchoolId} \"{Name}\" created.", id, normalized);
logger.LogInformation("School {SchoolId} \"{Name}\" created with seed {Seed}.", id, normalized, seed);
command.Result.TrySetResult(new SchoolCreationOutcome(worker.Snapshot, SchoolCreationError.None));
}
catch (Exception ex)
@@ -549,6 +550,7 @@ internal sealed class GameLoopService(
save.Map,
save.NameSetId,
save.NativeLanguage,
createSeed: null,
save.Presence);
worker.Start();
@@ -598,6 +600,7 @@ internal sealed class GameLoopService(
MapLayout? map,
string? nameSetId,
string? nativeLanguage,
int? createSeed = null,
IReadOnlyList<PresenceSnapshot>? presence = null) =>
new(
id,
@@ -610,6 +613,7 @@ internal sealed class GameLoopService(
map,
nameSetId,
nativeLanguage,
createSeed,
presence,
_options,
clients,