Complete phase 47 romance pack on generic orientation and affinity hooks.

Vanilla catalogs stay without crushes; a content pack ships the overlay so later mods can reuse it.
This commit is contained in:
Leonid Pershin
2026-08-20 10:42:42 +03:00
parent cb869e4977
commit d2911c3daf
43 changed files with 1840 additions and 29 deletions
+21
View File
@@ -55,9 +55,30 @@ public sealed record Person
/// <summary>What this person thinks of others, A→B. Sparse; zero is not stored.</summary>
public IReadOnlyDictionary<string, int> Opinions { get; init; } = new Dictionary<string, int>(StringComparer.Ordinal);
/// <summary>
/// OrientationDef name. Null when the catalog has no orientations (vanilla). Omitted from JSON.
/// </summary>
public string? Orientation { get; init; }
/// <summary>Crushes and the one pair. Null without an orientation pack. Mutable overlay.</summary>
public PersonBonds? Bonds { get; set; }
public int AgeOn(DateTime asOf) => SchoolYears.AgeYears(BirthDate, asOf);
}
/// <summary>
/// One-way crushes and at most one pair. Lives on the person when a pack shipped orientations.
/// Mutated in place the same way opinions are.
/// </summary>
public sealed class PersonBonds
{
public List<string> Crushes { get; set; } = [];
public string? PartnerId { get; set; }
public DateTime? PairEndedOn { get; set; }
}
public sealed record PersonName(
string Given,
string Surname,