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
-28
View File
@@ -1,4 +1,3 @@
using System.Globalization;
using Arch.Core;
using HSchool.Ai;
using HSchool.Content;
@@ -6,33 +5,6 @@ using HSchool.People;
namespace HSchool.Simulation;
/// <summary>Log row types phase 36 will page. Captions are ready even while the card has no tab.</summary>
public static class PersonLogTypes
{
public const string ApparelReplaced = "apparel-replaced";
}
/// <summary>
/// One thing that happened to a person today. Stored on the worker, not in <c>people.json</c>.
/// The day boundary is six in the morning — the same hour skip lands on.
/// </summary>
public sealed record PersonLogEvent(string PersonId, DateTime Time, string Type, string? ThingDef)
{
public string Caption(DefCatalog catalog, string locale)
{
ArgumentNullException.ThrowIfNull(catalog);
if (!Type.Equals(PersonLogTypes.ApparelReplaced, StringComparison.Ordinal) || ThingDef is null)
{
return Type;
}
var name = catalog.Things.TryGetValue(ThingDef, out var def)
? catalog.Label(locale, def)
: ThingDef;
return string.Format(CultureInfo.InvariantCulture, catalog.Text(locale, "ApparelReplaced"), name);
}
}
/// <summary>Condition captions live in the catalog. The client draws what it is told.</summary>
public static class ApparelCondition
{