Implement phase 35 dress appropriateness and school rules.
Adds outfit evaluation, morning home dressing, locker-room ChangeClothes with day-log events, PE/weather AI goals, dress-rules API, and tests.
This commit is contained in:
@@ -225,6 +225,17 @@ internal sealed class GameLoopService(
|
||||
new WorkerCommand.UnpinLesson(unpin.ClassId, unpin.Subject, unpin.Day, unpin.Period, unpin.Result),
|
||||
unpin.Result);
|
||||
break;
|
||||
|
||||
case GameCommand.GetDressRules getRules:
|
||||
HandleDressRules(getRules.SchoolId, new WorkerCommand.GetDressRules(getRules.Result), getRules.Result);
|
||||
break;
|
||||
|
||||
case GameCommand.SetDressRules setRules:
|
||||
HandleDressRules(
|
||||
setRules.SchoolId,
|
||||
new WorkerCommand.SetDressRules(setRules.PendingStudents, setRules.PendingStaff, setRules.Result),
|
||||
setRules.Result);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,6 +266,14 @@ internal sealed class GameLoopService(
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleDressRules(int schoolId, WorkerCommand command, TaskCompletionSource<DressRulesOutcome> result)
|
||||
{
|
||||
if (!_workers.TryGetValue(schoolId, out var worker) || !worker.Post(command))
|
||||
{
|
||||
result.TrySetResult(DressRulesOutcome.Fail(DressRulesError.UnknownSchool));
|
||||
}
|
||||
}
|
||||
|
||||
private void HandleStaffing(int schoolId, WorkerCommand command, TaskCompletionSource<StaffingOutcome> result)
|
||||
{
|
||||
if (!_workers.TryGetValue(schoolId, out var worker) || !worker.Post(command))
|
||||
@@ -560,7 +579,8 @@ internal sealed class GameLoopService(
|
||||
save.ClimatePresetId,
|
||||
save.NativeLanguage,
|
||||
createSeed: null,
|
||||
save.Presence);
|
||||
save.Presence,
|
||||
save.DressRules);
|
||||
worker.Start();
|
||||
|
||||
try
|
||||
@@ -611,7 +631,8 @@ internal sealed class GameLoopService(
|
||||
string? climatePresetId,
|
||||
string? nativeLanguage,
|
||||
int? createSeed = null,
|
||||
IReadOnlyList<PresenceSnapshot>? presence = null) =>
|
||||
IReadOnlyList<PresenceSnapshot>? presence = null,
|
||||
SchoolDressRules? dressRules = null) =>
|
||||
new(
|
||||
id,
|
||||
name,
|
||||
@@ -626,6 +647,7 @@ internal sealed class GameLoopService(
|
||||
nativeLanguage,
|
||||
createSeed,
|
||||
presence,
|
||||
dressRules,
|
||||
_options,
|
||||
clients,
|
||||
metrics,
|
||||
|
||||
Reference in New Issue
Block a user