Enhance family and roster management in school simulation by implementing support for incomplete families, ensuring proper handling of absent parents while maintaining surname consistency. Update family creation logic to account for single-parent households and revise child identification to prevent ID conflicts. Introduce seat shuffling to prevent siblings from being placed in the same class, improving the realism of student distribution. Update related tests to validate these new functionalities and ensure robustness in family and roster handling.
ci / server (push) Failing after 3m49s
ci / client (push) Successful in 24s

This commit is contained in:
Leonid Pershin
2026-08-18 21:13:16 +03:00
parent 7f6852548d
commit 3366e8e44b
19 changed files with 766 additions and 90 deletions
@@ -94,6 +94,27 @@ public class PeopleDefTests
Assert.Contains("Missing", ex.Message);
}
/// <summary>
/// The derived build is computed from these two by name. A pack that renames them used to
/// load fine and hand every single person the fallback height and weight — and therefore the
/// same build, which then drives every body limit on every skill.
/// </summary>
[Fact]
public void BodyAttributesWithoutHeightOrWeight_FailTheCatalog()
{
var ex = Assert.Throws<ContentLoadException>(() => _loader.Load(
[CatalogLoader.CorePackId],
[
PackDocuments.Def(
CatalogLoader.CorePackId,
"bodies",
"stature",
"""{ "defName": "Stature", "kind": "number", "distributions": [ { "distribution": { "mean": 170, "stdDev": 8 } } ] }"""),
]));
Assert.Contains("Height", ex.Message);
}
[Fact]
public void UnknownBuildValue_FailsTheCatalog()
{