Merge branch 'phase/36-person-card-tabs'
ci / server (push) Failing after 4m1s
ci / client (push) Failing after 17s

This commit is contained in:
Leonid Pershin
2026-08-20 04:35:35 +03:00
29 changed files with 1458 additions and 280 deletions
+24 -3
View File
@@ -116,11 +116,17 @@ public sealed class School : IDisposable
public int PendingDecisionCount => DecisionQueue.Count;
/// <summary>
/// Today's history for phase 36. Cleared at six in the morning. Not written to disk.
/// Today's history for the person card. Cleared at six in the morning. Not written to disk.
/// </summary>
public IReadOnlyList<PersonLogEvent> DayLog => _dayLog;
internal void ResetDayLog() => _dayLog.Clear();
internal Dictionary<string, string?> LoggedActivity { get; } = new(StringComparer.Ordinal);
internal void ResetDayLog()
{
_dayLog.Clear();
LoggedActivity.Clear();
}
internal void AppendDayLog(PersonLogEvent row) => _dayLog.Add(row);
@@ -150,6 +156,7 @@ public sealed class School : IDisposable
LastDecisionSlot = null;
Plans.Clear();
DecisionQueue.Clear();
LoggedActivity.Clear();
SyncWeather(force: true);
}
@@ -158,7 +165,13 @@ public sealed class School : IDisposable
ObjectDisposedException.ThrowIf(_disposed, this);
ArgumentException.ThrowIfNullOrWhiteSpace(personId);
ArgumentException.ThrowIfNullOrWhiteSpace(actionId);
return ActivitySystem.TryStart(this, personId, actionId);
var started = ActivitySystem.TryStart(this, personId, actionId);
if (started)
{
PersonDayLog.Sync(this);
}
return started;
}
public void ConfigurePresence(int weekDays = 5, int maxDecisionsPerTick = 64, int maxSkipDays = 400)
@@ -217,6 +230,7 @@ public sealed class School : IDisposable
var before = Clock.Time;
Clock.JumpTo(next.Value);
ResetDayLog();
var peopleChanged = TryYearlyIntake(before, next.Value);
peopleChanged |= TryApplicantRefresh();
PlanDay = null;
@@ -273,6 +287,11 @@ public sealed class School : IDisposable
var peopleChanged = false;
if (gameMinutes > 0)
{
if (PersonDayLog.CrossedDayStart(before, Clock.Time))
{
ResetDayLog();
}
peopleChanged = TryYearlyIntake(before, Clock.Time);
peopleChanged |= TryApplicantRefresh();
if (peopleChanged)
@@ -287,6 +306,8 @@ public sealed class School : IDisposable
PresenceSystem.Enqueue(this, id);
}
PersonDayLog.Sync(this);
if (Catalog is not null)
{
var below = PresenceSystem.BelowThreshold(this);