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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user