Add speech-topic policy from tomorrow and a morning family talk.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -290,6 +290,17 @@ internal sealed class GameLoopService(
|
||||
new WorkerCommand.SetDressRules(setRules.PendingStudents, setRules.PendingStaff, setRules.Result),
|
||||
setRules.Result);
|
||||
break;
|
||||
|
||||
case GameCommand.GetSpeechRules getSpeech:
|
||||
HandleSpeechRules(getSpeech.SchoolId, new WorkerCommand.GetSpeechRules(getSpeech.Result), getSpeech.Result);
|
||||
break;
|
||||
|
||||
case GameCommand.SetSpeechRules setSpeech:
|
||||
HandleSpeechRules(
|
||||
setSpeech.SchoolId,
|
||||
new WorkerCommand.SetSpeechRules(setSpeech.PendingStudents, setSpeech.PendingStaff, setSpeech.Result),
|
||||
setSpeech.Result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,6 +339,14 @@ internal sealed class GameLoopService(
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleSpeechRules(int schoolId, WorkerCommand command, TaskCompletionSource<SpeechRulesOutcome> result)
|
||||
{
|
||||
if (!_workers.TryGetValue(schoolId, out var worker) || !worker.Post(command))
|
||||
{
|
||||
result.TrySetResult(SpeechRulesOutcome.Fail(SpeechRulesError.UnknownSchool));
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleStaffing(int schoolId, WorkerCommand command, TaskCompletionSource<StaffingOutcome> result)
|
||||
{
|
||||
if (!_workers.TryGetValue(schoolId, out var worker) || !worker.Post(command))
|
||||
@@ -700,6 +719,7 @@ internal sealed class GameLoopService(
|
||||
createSeed: null,
|
||||
save.Presence,
|
||||
save.DressRules,
|
||||
save.SpeechRules,
|
||||
save.Owner,
|
||||
save.PortraitSettings);
|
||||
worker.Start();
|
||||
@@ -758,6 +778,7 @@ internal sealed class GameLoopService(
|
||||
int? createSeed = null,
|
||||
IReadOnlyList<PresenceSnapshot>? presence = null,
|
||||
SchoolDressRules? dressRules = null,
|
||||
SchoolSpeechRules? speechRules = null,
|
||||
string? owner = null,
|
||||
SwarmUiConfigFile? portraitSettings = null) =>
|
||||
new(
|
||||
@@ -775,6 +796,7 @@ internal sealed class GameLoopService(
|
||||
createSeed,
|
||||
presence,
|
||||
dressRules,
|
||||
speechRules,
|
||||
owner,
|
||||
portraitSettings,
|
||||
_options,
|
||||
|
||||
Reference in New Issue
Block a user