Auto-summon pupils to the principal after fight breaks, with a corridor FIFO queue.

This commit is contained in:
Leonid Pershin
2026-08-21 11:49:06 +03:00
parent 8f1a82f42d
commit e40f130248
17 changed files with 839 additions and 18 deletions
+12
View File
@@ -142,6 +142,13 @@ public sealed class School : IDisposable
internal Dictionary<string, ApologyDebt> ApologyDebts { get; } = new(StringComparer.Ordinal);
/// <summary>
/// Auto director summons FIFO. Worker thread only — never HTTP. Cleared on morning / skip.
/// </summary>
internal List<DirectorSummonTicket> DirectorSummons { get; } = [];
internal int NextSummonOrder { get; set; }
/// <summary>
/// A finished or interrupted circle wrote opinions onto the roster. <see cref="Tick"/>
/// returns this so the worker persists <c>people.json</c> — same seam as morning dress.
@@ -290,6 +297,7 @@ public sealed class School : IDisposable
var before = Clock.Time;
Clock.JumpTo(next.Value);
TalkCircleSystem.AbandonAll(this);
DirectorSummonSystem.ClearAll(this);
ResetDayLog();
var peopleChanged = TryYearlyIntake(before, next.Value);
peopleChanged |= TryApplicantRefresh();
@@ -362,6 +370,8 @@ public sealed class School : IDisposable
if (PersonDayLog.CrossedDayStart(before, Clock.Time))
{
ResetDayLog();
// Hung summons do not survive the work morning — same clear as skip empty.
DirectorSummonSystem.ClearAll(this);
}
peopleChanged = TryYearlyIntake(before, Clock.Time);
@@ -428,6 +438,8 @@ public sealed class School : IDisposable
PresenceSystem.Enqueue(this, id);
}
DirectorSummonSystem.Apply(this);
PersonDayLog.Sync(this);
if (Catalog is not null)