Let the catalog describe clothes and carryables on ThingDef without dressing anyone.
Empty layers keep furniture on the map; a known layer set and ColorDef palette reject unknown ids at load. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,6 +37,18 @@ public class VanillaCoreTests
|
||||
Assert.Equal(1, catalog.Things["Computer"].PupilSlots);
|
||||
Assert.Equal(0, catalog.Things["Desk"].PupilSlots);
|
||||
Assert.Equal(0, catalog.Things["Chair"].PupilSlots);
|
||||
Assert.Empty(catalog.Things["Chair"].Layers);
|
||||
Assert.False(catalog.Things["Chair"].Portable);
|
||||
Assert.Empty(catalog.Things["StudentDesk"].Layers);
|
||||
Assert.Equal([ApparelLayers.Bottom, ApparelLayers.Top], catalog.Things["Dress"].Layers);
|
||||
Assert.Contains("Red", catalog.Things["TShirt"].Colors);
|
||||
Assert.True(catalog.Things["PeShirt"].Pe);
|
||||
Assert.True(catalog.Things["Textbook"].Portable);
|
||||
Assert.Empty(catalog.Things["Textbook"].Layers);
|
||||
Assert.Equal(1, catalog.Things.Values.Count(thing => thing.DefName == "Textbook"));
|
||||
Assert.Equal([ColorTags.Bright], catalog.Colors["Red"].Tags);
|
||||
Assert.Equal([ColorTags.Neutral, ColorTags.School], catalog.Colors["White"].Tags);
|
||||
Assert.Empty(catalog.Colors["Beige"].Tags);
|
||||
Assert.True(catalog.Subjects.ContainsKey("PrimarySchool"));
|
||||
Assert.Equal(1, catalog.Subjects["PrimarySchool"].Grades.Min);
|
||||
Assert.Equal(4, catalog.Subjects["PrimarySchool"].Grades.Max);
|
||||
@@ -57,6 +69,9 @@ public class VanillaCoreTests
|
||||
Assert.DoesNotContain(map.Rooms, room => room.Label is "1A" or "1B" or "2A" or "2B");
|
||||
Assert.Equal(16, map.Rooms.Single(room => room.Id == "classroom-101").Seats);
|
||||
Assert.Empty(map.Rooms.Single(room => room.Id == "classroom-101").Slots);
|
||||
Assert.Equal(
|
||||
2,
|
||||
catalog.Things.Values.Count(thing => !thing.Abstract && thing.PupilSlots > 0));
|
||||
Assert.Equal(0.5f, catalog.Rooms["Classroom"].TravelMinutes);
|
||||
Assert.Equal(1.5f, catalog.Rooms["Corridor"].TravelMinutes);
|
||||
Assert.Equal(1.5f, catalog.Rooms["Stairwell"].TravelMinutes);
|
||||
@@ -119,11 +134,13 @@ public class VanillaCoreTests
|
||||
keys.AddRange(Names(catalog.DayFrames.Values));
|
||||
keys.AddRange(Names(catalog.Holidays.Values));
|
||||
keys.AddRange(Names(catalog.Behavior.Values));
|
||||
keys.AddRange(Names(catalog.Colors.Values));
|
||||
keys.AddRange(catalog.PackIds);
|
||||
|
||||
// Derived in code, so no def carries them.
|
||||
keys.Add(BodyBuilds.Attribute);
|
||||
keys.AddRange(BodyBuilds.Values);
|
||||
keys.AddRange(ApparelLayers.All);
|
||||
|
||||
foreach (var value in catalog.BodyAttributes.Values.SelectMany(def => def.Options))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user