Update wire protocol to version 5, introducing pupil slots and item counts in map snapshots. Enhance UI components to display pupil slots and item counts in game screens and map editors. Revise localization strings for improved user guidance. Update tests to validate new functionalities and ensure robustness in handling room and item data.
This commit is contained in:
@@ -352,6 +352,11 @@ public sealed class CatalogLoader
|
||||
{
|
||||
foreach (var thing in catalog.Things.Values)
|
||||
{
|
||||
if (thing.PupilSlots < 0 || thing.PupilSlots > byte.MaxValue)
|
||||
{
|
||||
throw new ContentLoadException($"ThingDef '{thing.DefName}' pupilSlots must be 0–{byte.MaxValue}.");
|
||||
}
|
||||
|
||||
foreach (var action in thing.Actions)
|
||||
{
|
||||
if (!catalog.Actions.ContainsKey(action))
|
||||
@@ -369,6 +374,11 @@ public sealed class CatalogLoader
|
||||
{
|
||||
throw new ContentLoadException($"RoomDef '{room.DefName}' slot '{slot.Key}' references unknown ThingDef '{slot.Thing}'.");
|
||||
}
|
||||
|
||||
if (slot.Count < 0 || slot.Count > byte.MaxValue)
|
||||
{
|
||||
throw new ContentLoadException($"RoomDef '{room.DefName}' slot '{slot.Key}' count must be 0–{byte.MaxValue}.");
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var position in room.Positions)
|
||||
|
||||
Reference in New Issue
Block a user