Merge branch 'phase/74-attendance'

This commit is contained in:
Leonid Pershin
2026-08-21 13:15:05 +03:00
13 changed files with 836 additions and 12 deletions
+6
View File
@@ -116,6 +116,9 @@ public sealed class School : IDisposable
internal DaySlot? LastDecisionSlot { get; set; }
/// <summary>Last slot <see cref="AttendanceSystem"/> observed — detects leaving a lesson to finalize absents.</summary>
internal DaySlot? LastAttendanceSlot { get; set; }
internal Dictionary<string, DayPlan> Plans { get; } = new(StringComparer.Ordinal);
internal Queue<string> DecisionQueue { get; } = new();
@@ -162,6 +165,7 @@ public sealed class School : IDisposable
LoggedActivity.Clear();
_lessonLogOnce.Clear();
_lessonMarkOnce.Clear();
LastAttendanceSlot = null;
}
internal void AppendDayLog(PersonLogEvent row) => _dayLog.Add(row);
@@ -214,6 +218,7 @@ public sealed class School : IDisposable
RosterSpawner.Spawn(World, roster, Catalog);
PlanDay = null;
LastDecisionSlot = null;
LastAttendanceSlot = null;
Plans.Clear();
DecisionQueue.Clear();
LoggedActivity.Clear();
@@ -475,6 +480,7 @@ public sealed class School : IDisposable
PresenceSystem.EnqueueNewlyUrgent(this, below);
PresenceSystem.DrainDecisions(this);
LessonLearningSystem.Apply(this, gameMinutes);
AttendanceSystem.Apply(this);
peopleChanged |= ApparelWear.Apply(this, gameMinutes, Clock.Time.AddMinutes(-gameMinutes));
peopleChanged |= AffinitySystem.Apply(this, talked);
}