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
+16 -3
View File
@@ -23,12 +23,17 @@ public class MapViewTests
var officeRu = ru.Single(node => node.Id == "principals-office");
Assert.Equal("Кабинет директора", officeRu.Name);
Assert.Equal(["Кресло директора", "Стол", "Стул"], officeRu.Items);
Assert.Equal(
[new MapViewItem("Кресло директора", 1), new MapViewItem("Стол", 1), new MapViewItem("Стул", 2)],
officeRu.Items);
Assert.Equal(0, officeRu.PupilSlots);
Assert.Equal(["Директор"], officeRu.Positions);
var officeEn = en.Single(node => node.Id == "principals-office");
Assert.Equal("Principal's office", officeEn.Name);
Assert.Equal(["Principal's chair", "Desk", "Chair"], officeEn.Items);
Assert.Equal(
[new MapViewItem("Principal's chair", 1), new MapViewItem("Desk", 1), new MapViewItem("Chair", 2)],
officeEn.Items);
Assert.Equal(["Principal"], officeEn.Positions);
var corridor = ru.Single(node => node.Id == "corridor-1");
@@ -38,7 +43,15 @@ public class MapViewTests
var classroom = ru.Single(node => node.Id == "classroom-1a");
Assert.Equal("Класс 1A", classroom.Name);
Assert.Equal(["Доска", "Стол", "Парта"], classroom.Items);
Assert.Equal(
[
new MapViewItem("Доска", 1),
new MapViewItem("Стол", 1),
new MapViewItem("Стул", 1),
new MapViewItem("Парта", 16),
],
classroom.Items);
Assert.Equal(16, classroom.PupilSlots);
Assert.Equal(["Учитель"], classroom.Positions);
Assert.Equal("Classroom 1A", en.Single(node => node.Id == "classroom-1a").Name);
}