Enhance map layout and room definitions by adding optional labels for rooms and updating the API to support new room naming conventions. Introduce additional room types and localization strings for improved user experience in both English and Russian. Refactor map view logic to accommodate new room attributes and ensure accurate rendering in the UI. Update tests to validate changes in room structure and localization.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{ "defName": "GymBuilding" }
|
||||
@@ -1 +0,0 @@
|
||||
{ "defName": "Principal" }
|
||||
@@ -0,0 +1,9 @@
|
||||
[
|
||||
{ "defName": "Principal" },
|
||||
{ "defName": "Secretary" },
|
||||
{ "defName": "Teacher" },
|
||||
{ "defName": "Librarian" },
|
||||
{ "defName": "Nurse" },
|
||||
{ "defName": "PETeacher" },
|
||||
{ "defName": "CafeteriaCook" },
|
||||
]
|
||||
@@ -0,0 +1,30 @@
|
||||
[
|
||||
{
|
||||
"defName": "Classroom",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk", "count": 16 },
|
||||
],
|
||||
"positions": ["Teacher"],
|
||||
"works": ["TeachLesson"],
|
||||
},
|
||||
{
|
||||
"defName": "Library",
|
||||
"slots": [
|
||||
{ "key": "desk", "thing": "Desk" },
|
||||
{ "key": "shelves", "thing": "Bookshelf", "count": 4 },
|
||||
],
|
||||
"positions": ["Librarian"],
|
||||
"works": ["LibraryWork"],
|
||||
},
|
||||
{
|
||||
"defName": "ComputerLab",
|
||||
"slots": [
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "computers", "thing": "Computer", "count": 12 },
|
||||
],
|
||||
"positions": ["Teacher"],
|
||||
"works": ["TeachLesson"],
|
||||
},
|
||||
]
|
||||
@@ -0,0 +1,5 @@
|
||||
[
|
||||
// Walkable rooms that exist to connect the graph: lobby, stairs. Empty on purpose.
|
||||
{ "defName": "EntranceHall" },
|
||||
{ "defName": "Stairwell" },
|
||||
]
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"defName": "GymHall",
|
||||
"slots": [
|
||||
{ "key": "benches", "thing": "Bench", "count": 4 },
|
||||
],
|
||||
"positions": ["PETeacher"],
|
||||
"works": ["PELesson"],
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
[
|
||||
{
|
||||
"defName": "SecretaryOffice",
|
||||
"slots": [
|
||||
{ "key": "desk", "thing": "Desk" },
|
||||
{ "key": "chair", "thing": "Chair" },
|
||||
],
|
||||
"positions": ["Secretary"],
|
||||
"works": ["OfficeWork"],
|
||||
},
|
||||
{
|
||||
"defName": "TeachersRoom",
|
||||
"slots": [
|
||||
{ "key": "table", "thing": "DiningTable" },
|
||||
{ "key": "chairs", "thing": "Chair", "count": 6 },
|
||||
],
|
||||
},
|
||||
{
|
||||
"defName": "Cafeteria",
|
||||
"slots": [
|
||||
{ "key": "counter", "thing": "DiningTable" },
|
||||
{ "key": "seats", "thing": "Chair", "count": 8 },
|
||||
],
|
||||
"positions": ["CafeteriaCook"],
|
||||
"works": ["ServeLunch"],
|
||||
},
|
||||
{
|
||||
"defName": "Restroom",
|
||||
},
|
||||
{
|
||||
"defName": "MedicalOffice",
|
||||
"slots": [
|
||||
{ "key": "couch", "thing": "MedicalCouch" },
|
||||
{ "key": "desk", "thing": "Desk" },
|
||||
],
|
||||
"positions": ["Nurse"],
|
||||
"works": ["MedicalDuty"],
|
||||
},
|
||||
{
|
||||
"defName": "ChangingRoom",
|
||||
"slots": [
|
||||
{ "key": "lockers", "thing": "Locker", "count": 12 },
|
||||
],
|
||||
},
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{ "defName": "Blackboard" },
|
||||
{ "defName": "StudentDesk", "parent": "Desk", "actions": ["Sit"] },
|
||||
{ "defName": "Bookshelf" },
|
||||
{ "defName": "DiningTable" },
|
||||
{ "defName": "Bench", "actions": ["Sit"] },
|
||||
{ "defName": "Computer" },
|
||||
{ "defName": "MedicalCouch" },
|
||||
{ "defName": "Locker" },
|
||||
]
|
||||
@@ -2,4 +2,9 @@
|
||||
{ "defName": "PrincipalOfficeWork" },
|
||||
{ "defName": "TeachLesson" },
|
||||
{ "defName": "WalkSchool" },
|
||||
{ "defName": "OfficeWork" },
|
||||
{ "defName": "LibraryWork" },
|
||||
{ "defName": "MedicalDuty" },
|
||||
{ "defName": "PELesson" },
|
||||
{ "defName": "ServeLunch" },
|
||||
]
|
||||
|
||||
@@ -3,13 +3,45 @@
|
||||
"Chair": "Chair",
|
||||
"DirectorsChair": "Principal's chair",
|
||||
"Desk": "Desk",
|
||||
"StudentDesk": "Student desk",
|
||||
"Blackboard": "Blackboard",
|
||||
"Bookshelf": "Bookshelf",
|
||||
"DiningTable": "Table",
|
||||
"Bench": "Bench",
|
||||
"Computer": "Computer",
|
||||
"MedicalCouch": "Exam couch",
|
||||
"Locker": "Locker",
|
||||
"Principal": "Principal",
|
||||
"Secretary": "Secretary",
|
||||
"Teacher": "Teacher",
|
||||
"Librarian": "Librarian",
|
||||
"Nurse": "Nurse",
|
||||
"PETeacher": "PE teacher",
|
||||
"CafeteriaCook": "Cook",
|
||||
"PrincipalOfficeWork": "Principal's work",
|
||||
"TeachLesson": "Teach a lesson",
|
||||
"WalkSchool": "Walk the school",
|
||||
"OfficeWork": "Office work",
|
||||
"LibraryWork": "Library work",
|
||||
"MedicalDuty": "Nurse's duty",
|
||||
"PELesson": "PE lesson",
|
||||
"ServeLunch": "Serve lunch",
|
||||
"SchoolYard": "Yard",
|
||||
"MainBuilding": "Main building",
|
||||
"GymBuilding": "Gym building",
|
||||
"StandardFloor": "Floor",
|
||||
"Corridor": "Corridor",
|
||||
"EntranceHall": "Lobby",
|
||||
"Stairwell": "Stairs",
|
||||
"PrincipalsOffice": "Principal's office",
|
||||
"SecretaryOffice": "Reception",
|
||||
"TeachersRoom": "Staff room",
|
||||
"Classroom": "Classroom",
|
||||
"Cafeteria": "Cafeteria",
|
||||
"Restroom": "Restroom",
|
||||
"MedicalOffice": "Nurse's office",
|
||||
"Library": "Library",
|
||||
"ComputerLab": "Computer lab",
|
||||
"GymHall": "Gym",
|
||||
"ChangingRoom": "Changing room",
|
||||
}
|
||||
|
||||
@@ -3,13 +3,45 @@
|
||||
"Chair": "Стул",
|
||||
"DirectorsChair": "Кресло директора",
|
||||
"Desk": "Стол",
|
||||
"StudentDesk": "Парта",
|
||||
"Blackboard": "Доска",
|
||||
"Bookshelf": "Стеллаж",
|
||||
"DiningTable": "Обеденный стол",
|
||||
"Bench": "Скамейка",
|
||||
"Computer": "Компьютер",
|
||||
"MedicalCouch": "Кушетка",
|
||||
"Locker": "Шкафчик",
|
||||
"Principal": "Директор",
|
||||
"Secretary": "Секретарь",
|
||||
"Teacher": "Учитель",
|
||||
"Librarian": "Библиотекарь",
|
||||
"Nurse": "Медсестра",
|
||||
"PETeacher": "Учитель физкультуры",
|
||||
"CafeteriaCook": "Повар",
|
||||
"PrincipalOfficeWork": "Работа директора",
|
||||
"TeachLesson": "Урок",
|
||||
"WalkSchool": "Обход школы",
|
||||
"OfficeWork": "Канцелярия",
|
||||
"LibraryWork": "Работа в библиотеке",
|
||||
"MedicalDuty": "Медпункт",
|
||||
"PELesson": "Урок физкультуры",
|
||||
"ServeLunch": "Раздача обеда",
|
||||
"SchoolYard": "Двор",
|
||||
"MainBuilding": "Главный корпус",
|
||||
"GymBuilding": "Спортзал",
|
||||
"StandardFloor": "Этаж",
|
||||
"Corridor": "Коридор",
|
||||
"EntranceHall": "Вестибюль",
|
||||
"Stairwell": "Лестница",
|
||||
"PrincipalsOffice": "Кабинет директора",
|
||||
"SecretaryOffice": "Приёмная",
|
||||
"TeachersRoom": "Учительская",
|
||||
"Classroom": "Класс",
|
||||
"Cafeteria": "Столовая",
|
||||
"Restroom": "Туалет",
|
||||
"MedicalOffice": "Медкабинет",
|
||||
"Library": "Библиотека",
|
||||
"ComputerLab": "Компьютерный класс",
|
||||
"GymHall": "Спортивный зал",
|
||||
"ChangingRoom": "Раздевалка",
|
||||
}
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
{
|
||||
// Walkable yard is the tree root and a graph node. Rooms reach it through the porch/corridor.
|
||||
// A small two-storey school: main building on the yard, gym across the yard.
|
||||
// Walkable graph is yard + rooms; floors are grouping only. Stairs link the two corridors.
|
||||
"territory": { "id": "yard", "def": "SchoolYard" },
|
||||
"buildings": [
|
||||
{ "id": "main", "def": "MainBuilding" },
|
||||
{ "id": "gym", "def": "GymBuilding" },
|
||||
],
|
||||
"floors": [
|
||||
{ "id": "floor-1", "def": "StandardFloor", "building": "main", "label": "1" },
|
||||
{ "id": "floor-2", "def": "StandardFloor", "building": "main", "label": "2" },
|
||||
{ "id": "gym-floor", "def": "StandardFloor", "building": "gym" },
|
||||
],
|
||||
"rooms": [
|
||||
{
|
||||
"id": "corridor-1",
|
||||
"def": "Corridor",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
},
|
||||
{ "id": "porch", "def": "EntranceHall", "building": "main", "floor": "floor-1" },
|
||||
{ "id": "corridor-1", "def": "Corridor", "building": "main", "floor": "floor-1", "label": "1" },
|
||||
{ "id": "stairs-1", "def": "Stairwell", "building": "main", "floor": "floor-1", "label": "1" },
|
||||
{
|
||||
"id": "principals-office",
|
||||
"def": "PrincipalsOffice",
|
||||
@@ -25,9 +26,157 @@
|
||||
{ "key": "guestChair", "thing": "Chair" },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "secretary-office",
|
||||
"def": "SecretaryOffice",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"slots": [
|
||||
{ "key": "desk", "thing": "Desk" },
|
||||
{ "key": "chair", "thing": "Chair" },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "teachers-room",
|
||||
"def": "TeachersRoom",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"slots": [
|
||||
{ "key": "table", "thing": "DiningTable" },
|
||||
{ "key": "chairs", "thing": "Chair" },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-1a",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"label": "1A",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk" },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-1b",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"label": "1B",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk" },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "cafeteria",
|
||||
"def": "Cafeteria",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"slots": [
|
||||
{ "key": "counter", "thing": "DiningTable" },
|
||||
{ "key": "seats", "thing": "Chair" },
|
||||
],
|
||||
},
|
||||
{ "id": "restroom-1", "def": "Restroom", "building": "main", "floor": "floor-1", "label": "1" },
|
||||
{
|
||||
"id": "medical-office",
|
||||
"def": "MedicalOffice",
|
||||
"building": "main",
|
||||
"floor": "floor-1",
|
||||
"slots": [
|
||||
{ "key": "couch", "thing": "MedicalCouch" },
|
||||
{ "key": "desk", "thing": "Desk" },
|
||||
],
|
||||
},
|
||||
{ "id": "corridor-2", "def": "Corridor", "building": "main", "floor": "floor-2", "label": "2" },
|
||||
{ "id": "stairs-2", "def": "Stairwell", "building": "main", "floor": "floor-2", "label": "2" },
|
||||
{
|
||||
"id": "classroom-2a",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"label": "2A",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk" },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "classroom-2b",
|
||||
"def": "Classroom",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"label": "2B",
|
||||
"slots": [
|
||||
{ "key": "board", "thing": "Blackboard" },
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "studentDesks", "thing": "StudentDesk" },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "library",
|
||||
"def": "Library",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"slots": [
|
||||
{ "key": "desk", "thing": "Desk" },
|
||||
{ "key": "shelves", "thing": "Bookshelf" },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "computer-lab",
|
||||
"def": "ComputerLab",
|
||||
"building": "main",
|
||||
"floor": "floor-2",
|
||||
"slots": [
|
||||
{ "key": "teacherDesk", "thing": "Desk" },
|
||||
{ "key": "computers", "thing": "Computer" },
|
||||
],
|
||||
},
|
||||
{ "id": "restroom-2", "def": "Restroom", "building": "main", "floor": "floor-2", "label": "2" },
|
||||
{
|
||||
"id": "gym-hall",
|
||||
"def": "GymHall",
|
||||
"building": "gym",
|
||||
"floor": "gym-floor",
|
||||
"slots": [
|
||||
{ "key": "benches", "thing": "Bench" },
|
||||
],
|
||||
},
|
||||
{
|
||||
"id": "changing-room",
|
||||
"def": "ChangingRoom",
|
||||
"building": "gym",
|
||||
"floor": "gym-floor",
|
||||
"slots": [
|
||||
{ "key": "lockers", "thing": "Locker" },
|
||||
],
|
||||
},
|
||||
],
|
||||
"links": [
|
||||
{ "a": "yard", "b": "corridor-1" },
|
||||
{ "a": "yard", "b": "porch" },
|
||||
{ "a": "porch", "b": "corridor-1" },
|
||||
{ "a": "corridor-1", "b": "stairs-1" },
|
||||
{ "a": "corridor-1", "b": "principals-office" },
|
||||
{ "a": "corridor-1", "b": "secretary-office" },
|
||||
{ "a": "corridor-1", "b": "teachers-room" },
|
||||
{ "a": "corridor-1", "b": "classroom-1a" },
|
||||
{ "a": "corridor-1", "b": "classroom-1b" },
|
||||
{ "a": "corridor-1", "b": "cafeteria" },
|
||||
{ "a": "corridor-1", "b": "restroom-1" },
|
||||
{ "a": "corridor-1", "b": "medical-office" },
|
||||
{ "a": "stairs-1", "b": "stairs-2" },
|
||||
{ "a": "stairs-2", "b": "corridor-2" },
|
||||
{ "a": "corridor-2", "b": "classroom-2a" },
|
||||
{ "a": "corridor-2", "b": "classroom-2b" },
|
||||
{ "a": "corridor-2", "b": "library" },
|
||||
{ "a": "corridor-2", "b": "computer-lab" },
|
||||
{ "a": "corridor-2", "b": "restroom-2" },
|
||||
{ "a": "yard", "b": "gym-hall" },
|
||||
{ "a": "gym-hall", "b": "changing-room" },
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user