Add lesson attendance from presence (present/late/absent).
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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();
|
||||
@@ -461,6 +466,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user