Give each school its own people seed so composition no longer follows create order.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -342,9 +342,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();
|
||||
|
||||
@@ -366,7 +367,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)
|
||||
@@ -513,6 +514,7 @@ internal sealed class GameLoopService(
|
||||
save.Map,
|
||||
save.NameSetId,
|
||||
save.NativeLanguage,
|
||||
createSeed: null,
|
||||
save.Presence);
|
||||
worker.Start();
|
||||
|
||||
@@ -562,6 +564,7 @@ internal sealed class GameLoopService(
|
||||
MapLayout? map,
|
||||
string? nameSetId,
|
||||
string? nativeLanguage,
|
||||
int? createSeed = null,
|
||||
IReadOnlyList<PresenceSnapshot>? presence = null) =>
|
||||
new(
|
||||
id,
|
||||
@@ -574,6 +577,7 @@ internal sealed class GameLoopService(
|
||||
map,
|
||||
nameSetId,
|
||||
nativeLanguage,
|
||||
createSeed,
|
||||
presence,
|
||||
_options,
|
||||
clients,
|
||||
|
||||
Reference in New Issue
Block a user