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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user