about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--data/connections.txtpb36
-rw-r--r--data/maps/the_bearer/connections.txtpb5
-rw-r--r--data/maps/the_bearer/rooms/Back Area.txtpb6
-rw-r--r--data/maps/the_bearer/rooms/Tree Entrance.txtpb6
-rw-r--r--data/maps/the_darkroom/connections.txtpb10
-rw-r--r--data/maps/the_darkroom/rooms/Congruent Entrance.txtpb7
-rw-r--r--data/maps/the_darkroom/rooms/Double Sided Entrance.txtpb7
-rw-r--r--data/maps/the_darkroom/rooms/First Room.txtpb6
-rw-r--r--data/maps/the_darkroom/rooms/Second Room.txtpb6
-rw-r--r--data/maps/the_entry/connections.txtpb15
-rw-r--r--data/maps/the_entry/rooms/Flipped Second Room.txtpb7
-rw-r--r--data/maps/the_entry/rooms/Four Rooms Entrance.txtpb7
-rw-r--r--data/maps/the_entry/rooms/Liberated Entrance.txtpb6
-rw-r--r--data/maps/the_entry/rooms/Link Area.txtpb12
-rw-r--r--data/maps/the_entry/rooms/Literate Entrance.txtpb6
-rw-r--r--proto/human.proto4
-rw-r--r--tools/validator/human_processor.cpp26
-rw-r--r--tools/validator/structs.h3
-rw-r--r--tools/validator/validator.cpp48
19 files changed, 174 insertions, 49 deletions
diff --git a/data/connections.txtpb b/data/connections.txtpb index 93e7faa..35e7ef8 100644 --- a/data/connections.txtpb +++ b/data/connections.txtpb
@@ -20,7 +20,7 @@ connections {
20 from { 20 from {
21 port { 21 port {
22 map: "the_entry" 22 map: "the_entry"
23 room: "Flipped Second Room" 23 room: "Four Rooms Entrance"
24 name: "FOUR" 24 name: "FOUR"
25 } 25 }
26 } 26 }
@@ -157,7 +157,7 @@ connections {
157 to { 157 to {
158 port { 158 port {
159 map: "the_darkroom" 159 map: "the_darkroom"
160 room: "Second Room" 160 room: "Congruent Entrance"
161 name: "CONGRUENT" 161 name: "CONGRUENT"
162 } 162 }
163 } 163 }
@@ -233,7 +233,7 @@ connections {
233 from { 233 from {
234 port { 234 port {
235 map: "the_darkroom" 235 map: "the_darkroom"
236 room: "First Room" 236 room: "Double Sided Entrance"
237 name: "DOUBLESIDED" 237 name: "DOUBLESIDED"
238 } 238 }
239 } 239 }
@@ -308,6 +308,23 @@ connections {
308 name: "GALLERY" 308 name: "GALLERY"
309 } 309 }
310 } 310 }
311 oneway: true
312}
313connections {
314 from {
315 port {
316 map: "the_butterfly"
317 room: "Main Area"
318 name: "GALLERY"
319 }
320 }
321 to {
322 room {
323 map: "the_gallery"
324 name: "Main Area"
325 }
326 }
327 oneway: true
311} 328}
312connections { 329connections {
313 from { 330 from {
@@ -618,7 +635,7 @@ connections {
618 from { 635 from {
619 port { 636 port {
620 map: "the_entry" 637 map: "the_entry"
621 room: "Link Area" 638 room: "Liberated Entrance"
622 name: "BLUE" 639 name: "BLUE"
623 } 640 }
624 } 641 }
@@ -666,7 +683,7 @@ connections {
666 from { 683 from {
667 port { 684 port {
668 map: "the_entry" 685 map: "the_entry"
669 room: "Link Area" 686 room: "Literate Entrance"
670 name: "BROWN" 687 name: "BROWN"
671 } 688 }
672 } 689 }
@@ -876,6 +893,7 @@ connections {
876 } 893 }
877 } 894 }
878 oneway: true 895 oneway: true
896 bypass_target_door: true
879} 897}
880connections { 898connections {
881 from { 899 from {
@@ -1455,7 +1473,6 @@ connections {
1455 name: "GREAT" 1473 name: "GREAT"
1456 } 1474 }
1457 } 1475 }
1458 door { map: "the_great" name: "Daedalus Entrance" }
1459 oneway: true 1476 oneway: true
1460} 1477}
1461connections { 1478connections {
@@ -1474,6 +1491,7 @@ connections {
1474 } 1491 }
1475 } 1492 }
1476 oneway: true 1493 oneway: true
1494 bypass_target_door: true
1477} 1495}
1478connections { 1496connections {
1479 from { 1497 from {
@@ -1769,12 +1787,13 @@ connections {
1769 } 1787 }
1770 } 1788 }
1771 oneway: true 1789 oneway: true
1790 bypass_target_door: true
1772} 1791}
1773connections { 1792connections {
1774 from { 1793 from {
1775 port { 1794 port {
1776 map: "the_bearer" 1795 map: "the_bearer"
1777 room: "Back Area" 1796 room: "Tree Entrance"
1778 name: "TREE" 1797 name: "TREE"
1779 } 1798 }
1780 } 1799 }
@@ -1851,7 +1870,6 @@ connections {
1851 } 1870 }
1852} 1871}
1853connections { 1872connections {
1854 # Two one-way connections because the door only blocks one direction.
1855 from { 1873 from {
1856 port { 1874 port {
1857 map: "the_great" 1875 map: "the_great"
@@ -1868,6 +1886,7 @@ connections {
1868 } 1886 }
1869} 1887}
1870connections { 1888connections {
1889 # Two one-way connections because the door only blocks one direction.
1871 from { 1890 from {
1872 port { 1891 port {
1873 map: "the_unkempt" 1892 map: "the_unkempt"
@@ -1900,6 +1919,7 @@ connections {
1900 } 1919 }
1901 } 1920 }
1902 oneway: true 1921 oneway: true
1922 bypass_target_door: true
1903} 1923}
1904connections { 1924connections {
1905 from { 1925 from {
diff --git a/data/maps/the_bearer/connections.txtpb b/data/maps/the_bearer/connections.txtpb index 23410f0..ba14d83 100644 --- a/data/maps/the_bearer/connections.txtpb +++ b/data/maps/the_bearer/connections.txtpb
@@ -263,3 +263,8 @@ connections {
263 to_room: "Butterfly Room" 263 to_room: "Butterfly Room"
264 door { name: "Butterfly Entrance" } 264 door { name: "Butterfly Entrance" }
265} 265}
266connections {
267 from_room: "Back Area"
268 to_room: "Tree Entrance"
269 door { name: "Control Center Brown Door" }
270}
diff --git a/data/maps/the_bearer/rooms/Back Area.txtpb b/data/maps/the_bearer/rooms/Back Area.txtpb index 27e175c..b1860de 100644 --- a/data/maps/the_bearer/rooms/Back Area.txtpb +++ b/data/maps/the_bearer/rooms/Back Area.txtpb
@@ -7,12 +7,6 @@ panels {
7 symbols: EXAMPLE 7 symbols: EXAMPLE
8} 8}
9ports { 9ports {
10 name: "TREE"
11 path: "Components/Warps/worldport3"
12 orientation: "north"
13 required_door { name: "Control Center Brown Door" }
14}
15ports {
16 name: "DAEDALUS" 10 name: "DAEDALUS"
17 path: "Components/Warps/worldport2" 11 path: "Components/Warps/worldport2"
18 orientation: "north" 12 orientation: "north"
diff --git a/data/maps/the_bearer/rooms/Tree Entrance.txtpb b/data/maps/the_bearer/rooms/Tree Entrance.txtpb new file mode 100644 index 0000000..97a07da --- /dev/null +++ b/data/maps/the_bearer/rooms/Tree Entrance.txtpb
@@ -0,0 +1,6 @@
1name: "Tree Entrance"
2ports {
3 name: "TREE"
4 path: "Components/Warps/worldport3"
5 orientation: "north"
6}
diff --git a/data/maps/the_darkroom/connections.txtpb b/data/maps/the_darkroom/connections.txtpb index 87e9b0e..1b7ad05 100644 --- a/data/maps/the_darkroom/connections.txtpb +++ b/data/maps/the_darkroom/connections.txtpb
@@ -38,3 +38,13 @@ connections {
38 to_room: "Cyan Hallway" 38 to_room: "Cyan Hallway"
39 door { name: "Colorful Entrance" } 39 door { name: "Colorful Entrance" }
40} 40}
41connections {
42 from_room: "Second Room"
43 to_room: "Congruent Entrance"
44 door { name: "Congruent Entrance" }
45}
46connections {
47 from_room: "First Room"
48 to_room: "Double Sided Entrance"
49 door { name: "Double Sided Entrance" }
50}
diff --git a/data/maps/the_darkroom/rooms/Congruent Entrance.txtpb b/data/maps/the_darkroom/rooms/Congruent Entrance.txtpb new file mode 100644 index 0000000..7ea1286 --- /dev/null +++ b/data/maps/the_darkroom/rooms/Congruent Entrance.txtpb
@@ -0,0 +1,7 @@
1name: "Congruent Entrance"
2panel_display_name: "Second Room"
3ports {
4 name: "CONGRUENT"
5 path: "Components/Warps/worldport7"
6 orientation: "east"
7}
diff --git a/data/maps/the_darkroom/rooms/Double Sided Entrance.txtpb b/data/maps/the_darkroom/rooms/Double Sided Entrance.txtpb new file mode 100644 index 0000000..9d25108 --- /dev/null +++ b/data/maps/the_darkroom/rooms/Double Sided Entrance.txtpb
@@ -0,0 +1,7 @@
1name: "Double Sided Entrance"
2panel_display_name: "First Room"
3ports {
4 name: "DOUBLESIDED"
5 path: "Components/Warps/worldport6"
6 orientation: "east"
7}
diff --git a/data/maps/the_darkroom/rooms/First Room.txtpb b/data/maps/the_darkroom/rooms/First Room.txtpb index 4e656bf..c635757 100644 --- a/data/maps/the_darkroom/rooms/First Room.txtpb +++ b/data/maps/the_darkroom/rooms/First Room.txtpb
@@ -42,9 +42,3 @@ ports {
42 orientation: "north" 42 orientation: "north"
43 required_door { name: "Second Room Entrance" } 43 required_door { name: "Second Room Entrance" }
44} 44}
45ports {
46 name: "DOUBLESIDED"
47 path: "Components/Warps/worldport6"
48 orientation: "east"
49 required_door { name: "Double Sided Entrance" }
50}
diff --git a/data/maps/the_darkroom/rooms/Second Room.txtpb b/data/maps/the_darkroom/rooms/Second Room.txtpb index baeea12..a3964ea 100644 --- a/data/maps/the_darkroom/rooms/Second Room.txtpb +++ b/data/maps/the_darkroom/rooms/Second Room.txtpb
@@ -47,9 +47,3 @@ ports {
47 orientation: "north" 47 orientation: "north"
48 required_door { name: "Third Room Entrance" } 48 required_door { name: "Third Room Entrance" }
49} 49}
50ports {
51 name: "CONGRUENT"
52 path: "Components/Warps/worldport7"
53 orientation: "east"
54 required_door { name: "Congruent Entrance" }
55}
diff --git a/data/maps/the_entry/connections.txtpb b/data/maps/the_entry/connections.txtpb index a2e325a..9813f85 100644 --- a/data/maps/the_entry/connections.txtpb +++ b/data/maps/the_entry/connections.txtpb
@@ -199,3 +199,18 @@ connections {
199 to_room: "White Hallway To Daedalus" 199 to_room: "White Hallway To Daedalus"
200 door { name: "Control Center White Door" } 200 door { name: "Control Center White Door" }
201} 201}
202connections {
203 from_room: "Flipped Second Room"
204 to_room: "Four Rooms Entrance"
205 door { name: "Flipped Second Room Right Door" }
206}
207connections {
208 from_room: "Link Area"
209 to_room: "Liberated Entrance"
210 door { name: "Liberated Entrance" }
211}
212connections {
213 from_room: "Link Area"
214 to_room: "Literate Entrance"
215 door { name: "Literate Entrance" }
216}
diff --git a/data/maps/the_entry/rooms/Flipped Second Room.txtpb b/data/maps/the_entry/rooms/Flipped Second Room.txtpb index 5841ca1..0d518bb 100644 --- a/data/maps/the_entry/rooms/Flipped Second Room.txtpb +++ b/data/maps/the_entry/rooms/Flipped Second Room.txtpb
@@ -21,10 +21,3 @@ paintings {
21 gravity: Y_PLUS 21 gravity: Y_PLUS
22 display_name: "Eye Painting" 22 display_name: "Eye Painting"
23} 23}
24ports {
25 name: "FOUR"
26 path: "Components/Warps/worldport9"
27 orientation: "south"
28 gravity: Y_PLUS
29 required_door { name: "Flipped Second Room Right Door" }
30} \ No newline at end of file
diff --git a/data/maps/the_entry/rooms/Four Rooms Entrance.txtpb b/data/maps/the_entry/rooms/Four Rooms Entrance.txtpb new file mode 100644 index 0000000..689d23e --- /dev/null +++ b/data/maps/the_entry/rooms/Four Rooms Entrance.txtpb
@@ -0,0 +1,7 @@
1name: "Four Rooms Entrance"
2ports {
3 name: "FOUR"
4 path: "Components/Warps/worldport9"
5 orientation: "south"
6 gravity: Y_PLUS
7}
diff --git a/data/maps/the_entry/rooms/Liberated Entrance.txtpb b/data/maps/the_entry/rooms/Liberated Entrance.txtpb new file mode 100644 index 0000000..f0176a0 --- /dev/null +++ b/data/maps/the_entry/rooms/Liberated Entrance.txtpb
@@ -0,0 +1,6 @@
1name: "Liberated Entrance"
2ports {
3 name: "BLUE"
4 path: "worldport8"
5 orientation: "west"
6}
diff --git a/data/maps/the_entry/rooms/Link Area.txtpb b/data/maps/the_entry/rooms/Link Area.txtpb index 689f57a..5b68279 100644 --- a/data/maps/the_entry/rooms/Link Area.txtpb +++ b/data/maps/the_entry/rooms/Link Area.txtpb
@@ -26,15 +26,3 @@ paintings {
26 orientation: "south" 26 orientation: "south"
27 display_name: "Center Painting" 27 display_name: "Center Painting"
28} 28}
29ports {
30 name: "BLUE"
31 path: "worldport8"
32 orientation: "west"
33 required_door { name: "Liberated Entrance" }
34}
35ports {
36 name: "BROWN"
37 path: "worldport9"
38 orientation: "east"
39 required_door { name: "Literate Entrance" }
40} \ No newline at end of file
diff --git a/data/maps/the_entry/rooms/Literate Entrance.txtpb b/data/maps/the_entry/rooms/Literate Entrance.txtpb new file mode 100644 index 0000000..4ec402f --- /dev/null +++ b/data/maps/the_entry/rooms/Literate Entrance.txtpb
@@ -0,0 +1,6 @@
1name: "Literate Entrance"
2ports {
3 name: "BROWN"
4 path: "worldport9"
5 orientation: "east"
6}
diff --git a/proto/human.proto b/proto/human.proto index e5335e7..615ac86 100644 --- a/proto/human.proto +++ b/proto/human.proto
@@ -66,6 +66,10 @@ message HumanConnection {
66 // If true, this connection will only be logically allowed if the Daedalus 66 // If true, this connection will only be logically allowed if the Daedalus
67 // Roof Access option is enabled. 67 // Roof Access option is enabled.
68 optional bool roof_access = 7; 68 optional bool roof_access = 7;
69
70 // This means that the connection intentionally skips the target object's
71 // required door.
72 optional bool bypass_target_door = 8;
69} 73}
70 74
71message HumanConnections { 75message HumanConnections {
diff --git a/tools/validator/human_processor.cpp b/tools/validator/human_processor.cpp index 561225e..2c978bf 100644 --- a/tools/validator/human_processor.cpp +++ b/tools/validator/human_processor.cpp
@@ -394,7 +394,9 @@ class HumanProcessor {
394 } 394 }
395 } else if (human_connection.has_from()) { 395 } else if (human_connection.has_from()) {
396 ProcessSingleConnection(human_connection, human_connection.from(), 396 ProcessSingleConnection(human_connection, human_connection.from(),
397 current_map_name); 397 current_map_name,
398 /*is_target=*/!human_connection.oneway() &&
399 !human_connection.bypass_target_door());
398 } 400 }
399 401
400 if (human_connection.has_to_room()) { 402 if (human_connection.has_to_room()) {
@@ -410,8 +412,9 @@ class HumanProcessor {
410 std::cout << "A global connection used to_room." << std::endl; 412 std::cout << "A global connection used to_room." << std::endl;
411 } 413 }
412 } else if (human_connection.has_to()) { 414 } else if (human_connection.has_to()) {
413 ProcessSingleConnection(human_connection, human_connection.to(), 415 ProcessSingleConnection(
414 current_map_name); 416 human_connection, human_connection.to(), current_map_name,
417 /*is_target=*/!human_connection.bypass_target_door());
415 } 418 }
416 419
417 if (human_connection.has_door()) { 420 if (human_connection.has_door()) {
@@ -432,7 +435,7 @@ class HumanProcessor {
432 void ProcessSingleConnection( 435 void ProcessSingleConnection(
433 const HumanConnection& human_connection, 436 const HumanConnection& human_connection,
434 const HumanConnection::Endpoint& endpoint, 437 const HumanConnection::Endpoint& endpoint,
435 const std::optional<std::string>& current_map_name) { 438 const std::optional<std::string>& current_map_name, bool is_target) {
436 if (endpoint.has_room()) { 439 if (endpoint.has_room()) {
437 auto room_identifier = 440 auto room_identifier =
438 GetCompleteRoomIdentifier(endpoint.room(), current_map_name); 441 GetCompleteRoomIdentifier(endpoint.room(), current_map_name);
@@ -451,6 +454,11 @@ class HumanProcessor {
451 if (painting_identifier) { 454 if (painting_identifier) {
452 PaintingInfo& painting_info = info_.paintings[*painting_identifier]; 455 PaintingInfo& painting_info = info_.paintings[*painting_identifier];
453 painting_info.connections_referenced_by.push_back(human_connection); 456 painting_info.connections_referenced_by.push_back(human_connection);
457
458 if (is_target) {
459 painting_info.target_connections_referenced_by.push_back(
460 human_connection);
461 }
454 } else { 462 } else {
455 // Not sure where else to store this right now. 463 // Not sure where else to store this right now.
456 std::cout 464 std::cout
@@ -463,6 +471,11 @@ class HumanProcessor {
463 if (port_identifier) { 471 if (port_identifier) {
464 PortInfo& port_info = info_.ports[*port_identifier]; 472 PortInfo& port_info = info_.ports[*port_identifier];
465 port_info.connections_referenced_by.push_back(human_connection); 473 port_info.connections_referenced_by.push_back(human_connection);
474
475 if (is_target) {
476 port_info.target_connections_referenced_by.push_back(
477 human_connection);
478 }
466 } else { 479 } else {
467 // Not sure where else to store this right now. 480 // Not sure where else to store this right now.
468 std::cout 481 std::cout
@@ -480,6 +493,11 @@ class HumanProcessor {
480 panel_info.proxies[endpoint.panel().answer()] 493 panel_info.proxies[endpoint.panel().answer()]
481 .connections_referenced_by.push_back(human_connection); 494 .connections_referenced_by.push_back(human_connection);
482 } 495 }
496
497 if (is_target) {
498 panel_info.target_connections_referenced_by.push_back(
499 human_connection);
500 }
483 } 501 }
484 } 502 }
485 } 503 }
diff --git a/tools/validator/structs.h b/tools/validator/structs.h index 17ed33a..d1d45f2 100644 --- a/tools/validator/structs.h +++ b/tools/validator/structs.h
@@ -56,12 +56,14 @@ struct PortInfo {
56 std::vector<HumanPort> definitions; 56 std::vector<HumanPort> definitions;
57 57
58 std::vector<HumanConnection> connections_referenced_by; 58 std::vector<HumanConnection> connections_referenced_by;
59 std::vector<HumanConnection> target_connections_referenced_by;
59}; 60};
60 61
61struct PaintingInfo { 62struct PaintingInfo {
62 std::vector<HumanPainting> definitions; 63 std::vector<HumanPainting> definitions;
63 64
64 std::vector<HumanConnection> connections_referenced_by; 65 std::vector<HumanConnection> connections_referenced_by;
66 std::vector<HumanConnection> target_connections_referenced_by;
65 std::vector<DoorIdentifier> doors_referenced_by; 67 std::vector<DoorIdentifier> doors_referenced_by;
66}; 68};
67 69
@@ -79,6 +81,7 @@ struct PanelInfo {
79 std::string map_area_name; 81 std::string map_area_name;
80 82
81 std::vector<HumanConnection> connections_referenced_by; 83 std::vector<HumanConnection> connections_referenced_by;
84 std::vector<HumanConnection> target_connections_referenced_by;
82 std::vector<DoorIdentifier> doors_referenced_by; 85 std::vector<DoorIdentifier> doors_referenced_by;
83 86
84 std::map<std::string, ProxyInfo> proxies; 87 std::map<std::string, ProxyInfo> proxies;
diff --git a/tools/validator/validator.cpp b/tools/validator/validator.cpp index 4149caa..e4c6324 100644 --- a/tools/validator/validator.cpp +++ b/tools/validator/validator.cpp
@@ -256,6 +256,22 @@ class Validator {
256 std::cout << "Port " << port_identifier.ShortDebugString() 256 std::cout << "Port " << port_identifier.ShortDebugString()
257 << " was defined multiple times." << std::endl; 257 << " was defined multiple times." << std::endl;
258 } 258 }
259
260 if (!port_info.target_connections_referenced_by.empty()) {
261 for (const HumanPort& port : port_info.definitions) {
262 if (port.has_required_door()) {
263 std::cout << "Port " << port_identifier.ShortDebugString()
264 << " has a required door but is the target of a connection:"
265 << std::endl;
266
267 for (const HumanConnection& connection :
268 port_info.target_connections_referenced_by) {
269 std::cout << " CONNECTION " << connection.ShortDebugString()
270 << std::endl;
271 }
272 }
273 }
274 }
259 } 275 }
260 276
261 void ValidatePainting(const PaintingIdentifier& painting_identifier, 277 void ValidatePainting(const PaintingIdentifier& painting_identifier,
@@ -279,6 +295,22 @@ class Validator {
279 std::cout << "Painting " << painting_identifier.ShortDebugString() 295 std::cout << "Painting " << painting_identifier.ShortDebugString()
280 << " was defined multiple times." << std::endl; 296 << " was defined multiple times." << std::endl;
281 } 297 }
298
299 if (!painting_info.target_connections_referenced_by.empty()) {
300 for (const HumanPainting& painting : painting_info.definitions) {
301 if (painting.has_required_door()) {
302 std::cout << "Painting " << painting_identifier.ShortDebugString()
303 << " has a required door but is the target of a connection:"
304 << std::endl;
305
306 for (const HumanConnection& connection :
307 painting_info.target_connections_referenced_by) {
308 std::cout << " CONNECTION " << connection.ShortDebugString()
309 << std::endl;
310 }
311 }
312 }
313 }
282 } 314 }
283 315
284 void ValidatePanel(const PanelIdentifier& panel_identifier, 316 void ValidatePanel(const PanelIdentifier& panel_identifier,
@@ -340,6 +372,22 @@ class Validator {
340 std::cout << "Panel " << panel_identifier.ShortDebugString() 372 std::cout << "Panel " << panel_identifier.ShortDebugString()
341 << " is missing an AP ID." << std::endl; 373 << " is missing an AP ID." << std::endl;
342 } 374 }
375
376 if (!panel_info.target_connections_referenced_by.empty()) {
377 for (const HumanPanel& panel : panel_info.definitions) {
378 if (panel.has_required_door()) {
379 std::cout << "Panel " << panel_identifier.ShortDebugString()
380 << " has a required door but is the target of a connection:"
381 << std::endl;
382
383 for (const HumanConnection& connection :
384 panel_info.target_connections_referenced_by) {
385 std::cout << " CONNECTION " << connection.ShortDebugString()
386 << std::endl;
387 }
388 }
389 }
390 }
343 } 391 }
344 392
345 void ValidateKeyholder(const KeyholderIdentifier& keyholder_identifier, 393 void ValidateKeyholder(const KeyholderIdentifier& keyholder_identifier,