Dress people at generation from a separate apparel stream.
Wardrobes live on the person in people.json: everyday layers, textbooks per parallel, and chance-based bags from catalog data. Hauling and the carry cap are defs, not constants. The golden roster gains an items column; later family members shift because Hauling consumes extra appearance rolls. Old saves without items are dressed on load. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -34,6 +34,7 @@ public class ApparelDefTests
|
||||
Assert.Empty(chair.Colors);
|
||||
Assert.Null(chair.SkirtLength);
|
||||
Assert.False(chair.Pe);
|
||||
Assert.Equal(0, chair.CarryChance);
|
||||
Assert.Equal(0, chair.PupilSlots);
|
||||
}
|
||||
|
||||
@@ -166,4 +167,20 @@ public class ApparelDefTests
|
||||
|
||||
Assert.Contains("TShirt", ex.Message, StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CarryChanceAboveOne_FailsTheCatalog()
|
||||
{
|
||||
var ex = Assert.Throws<ContentLoadException>(() => _loader.Load(
|
||||
[CatalogLoader.CorePackId],
|
||||
[
|
||||
PackDocuments.Def(
|
||||
CatalogLoader.CorePackId,
|
||||
"things",
|
||||
"phone",
|
||||
"""{ "defName": "Phone", "portable": true, "carryChance": 1.2 }"""),
|
||||
]));
|
||||
|
||||
Assert.Contains("carryChance", ex.Message, StringComparison.Ordinal);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user