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.
ci / server (push) Failing after 3m37s
ci / client (push) Successful in 28s

This commit is contained in:
Leonid Pershin
2026-08-18 17:21:16 +03:00
parent f000b128f6
commit 38afbcad36
26 changed files with 349 additions and 64 deletions
@@ -25,8 +25,20 @@ public class VanillaCoreTests
Assert.True(catalog.Rooms.ContainsKey("Classroom"));
Assert.Equal("Класс", catalog.Label("ru", catalog.Rooms["Classroom"]));
Assert.Equal(["Teacher"], catalog.PositionsFor(DefKind.Room, "Classroom"));
Assert.Equal(1, catalog.Things["StudentDesk"].PupilSlots);
Assert.Equal(1, catalog.Things["Computer"].PupilSlots);
Assert.Equal(0, catalog.Things["Desk"].PupilSlots);
Assert.Equal(0, catalog.Things["Chair"].PupilSlots);
Assert.Contains(catalog.Rooms["Classroom"].Slots, slot => slot.Key == "teacherChair" && slot.Thing == "Chair");
Assert.Equal(16, catalog.Rooms["Classroom"].Slots.Single(slot => slot.Key == "studentDesks").Count);
Assert.Equal(2, map.Buildings.Count);
Assert.True(map.Rooms.Count >= 18, "Vanilla layout should look like a small school, not a stub.");
Assert.Contains(map.Rooms, room => room.Id == "classroom-1a" && room.Label == "1A");
Assert.Equal(
16,
map.Rooms.Single(room => room.Id == "classroom-1a").Slots.Single(slot => slot.Key == "studentDesks").Count);
Assert.Contains(
map.Rooms.Single(room => room.Id == "classroom-1a").Slots,
slot => slot.Key == "teacherChair" && slot.Thing == "Chair");
}
}