From 4c1dc83759d15b7f9f8aaddf580d2147f43fb845 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 19 Oct 2025 11:25:51 -0400 Subject: Annotate "worldport entrances" --- data/maps/the_congruent/metadata.txtpb | 4 ++++ data/maps/the_double_sided/metadata.txtpb | 4 ++++ data/maps/the_jubilant/metadata.txtpb | 4 ++++ data/maps/the_keen/metadata.txtpb | 4 ++++ data/maps/the_liberated/metadata.txtpb | 4 ++++ data/maps/the_linear/metadata.txtpb | 4 ++++ data/maps/the_lionized/metadata.txtpb | 4 ++++ data/maps/the_literate/metadata.txtpb | 4 ++++ data/maps/the_lively/metadata.txtpb | 4 ++++ data/maps/the_nuanced/metadata.txtpb | 4 ++++ data/maps/the_perceptive/metadata.txtpb | 4 ++++ data/maps/the_quiet/metadata.txtpb | 4 ++++ data/maps/the_sirenic/metadata.txtpb | 4 ++++ data/maps/the_sun_temple/metadata.txtpb | 4 ++++ data/maps/the_symbolic/metadata.txtpb | 4 ++++ data/maps/the_talented/metadata.txtpb | 4 ++++ data/maps/the_tower/metadata.txtpb | 4 ++++ data/maps/the_wondrous/metadata.txtpb | 4 ++++ proto/data.proto | 1 + proto/human.proto | 1 + tools/datapacker/main.cpp | 7 +++++++ tools/validator/human_processor.cpp | 11 +++++++++++ tools/validator/structs.h | 3 +++ tools/validator/validator.cpp | 12 ++++++++++-- 24 files changed, 105 insertions(+), 2 deletions(-) diff --git a/data/maps/the_congruent/metadata.txtpb b/data/maps/the_congruent/metadata.txtpb index 16428c4..6260ed4 100644 --- a/data/maps/the_congruent/metadata.txtpb +++ b/data/maps/the_congruent/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Congruent" +worldport_entrance { + room: "Main Area" + name: "DARKROOM" +} diff --git a/data/maps/the_double_sided/metadata.txtpb b/data/maps/the_double_sided/metadata.txtpb index c354fd8..6f56c63 100644 --- a/data/maps/the_double_sided/metadata.txtpb +++ b/data/maps/the_double_sided/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Double Sided" +worldport_entrance { + room: "Start" + name: "DARKROOM" +} diff --git a/data/maps/the_jubilant/metadata.txtpb b/data/maps/the_jubilant/metadata.txtpb index 7de7b85..4af1874 100644 --- a/data/maps/the_jubilant/metadata.txtpb +++ b/data/maps/the_jubilant/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Jubilant" +worldport_entrance { + room: "Main Area" + name: "GREAT" +} diff --git a/data/maps/the_keen/metadata.txtpb b/data/maps/the_keen/metadata.txtpb index 669f608..909f420 100644 --- a/data/maps/the_keen/metadata.txtpb +++ b/data/maps/the_keen/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Keen" +worldport_entrance { + room: "Main Area" + name: "GREAT" +} diff --git a/data/maps/the_liberated/metadata.txtpb b/data/maps/the_liberated/metadata.txtpb index a92d7e5..b9b4321 100644 --- a/data/maps/the_liberated/metadata.txtpb +++ b/data/maps/the_liberated/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Liberated" +worldport_entrance { + room: "Puzzle Room" + name: "ENTRY" +} diff --git a/data/maps/the_linear/metadata.txtpb b/data/maps/the_linear/metadata.txtpb index 989463d..838bb2b 100644 --- a/data/maps/the_linear/metadata.txtpb +++ b/data/maps/the_linear/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Linear" +worldport_entrance { + room: "Room" + name: "GREAT" +} diff --git a/data/maps/the_lionized/metadata.txtpb b/data/maps/the_lionized/metadata.txtpb index 38fd5c2..8d6168d 100644 --- a/data/maps/the_lionized/metadata.txtpb +++ b/data/maps/the_lionized/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Lionized" +worldport_entrance { + room: "Puzzle Room" + name: "ENTRY" +} diff --git a/data/maps/the_literate/metadata.txtpb b/data/maps/the_literate/metadata.txtpb index 76d1df6..0e04306 100644 --- a/data/maps/the_literate/metadata.txtpb +++ b/data/maps/the_literate/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Literate" +worldport_entrance { + room: "Puzzle Room" + name: "ENTRY" +} diff --git a/data/maps/the_lively/metadata.txtpb b/data/maps/the_lively/metadata.txtpb index cbf11c2..acd1177 100644 --- a/data/maps/the_lively/metadata.txtpb +++ b/data/maps/the_lively/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Lively" +worldport_entrance { + room: "Puzzle Room" + name: "BETWEEN" +} diff --git a/data/maps/the_nuanced/metadata.txtpb b/data/maps/the_nuanced/metadata.txtpb index 9c39826..4ac9b13 100644 --- a/data/maps/the_nuanced/metadata.txtpb +++ b/data/maps/the_nuanced/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Nuanced" +worldport_entrance { + room: "Main Room" + name: "UNYIELDING" +} diff --git a/data/maps/the_perceptive/metadata.txtpb b/data/maps/the_perceptive/metadata.txtpb index e0c64fb..6942cab 100644 --- a/data/maps/the_perceptive/metadata.txtpb +++ b/data/maps/the_perceptive/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Perceptive" +worldport_entrance { + room: "Main Area" + name: "CC" +} diff --git a/data/maps/the_quiet/metadata.txtpb b/data/maps/the_quiet/metadata.txtpb index 1fa2c46..d7fd0eb 100644 --- a/data/maps/the_quiet/metadata.txtpb +++ b/data/maps/the_quiet/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Quiet" +worldport_entrance { + room: "Main Area" + name: "DAEDALUS" +} diff --git a/data/maps/the_sirenic/metadata.txtpb b/data/maps/the_sirenic/metadata.txtpb index 19e26a3..80b1783 100644 --- a/data/maps/the_sirenic/metadata.txtpb +++ b/data/maps/the_sirenic/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Sirenic" +worldport_entrance { + room: "Start" + name: "PLAZA" +} diff --git a/data/maps/the_sun_temple/metadata.txtpb b/data/maps/the_sun_temple/metadata.txtpb index 97f9290..25ed636 100644 --- a/data/maps/the_sun_temple/metadata.txtpb +++ b/data/maps/the_sun_temple/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Sun Temple" +worldport_entrance { + room: "Entrance" + name: "UNKEMPT" +} diff --git a/data/maps/the_symbolic/metadata.txtpb b/data/maps/the_symbolic/metadata.txtpb index 311dead..2b37985 100644 --- a/data/maps/the_symbolic/metadata.txtpb +++ b/data/maps/the_symbolic/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Symbolic" +worldport_entrance { + room: "White Room" + name: "PLAZA" +} diff --git a/data/maps/the_talented/metadata.txtpb b/data/maps/the_talented/metadata.txtpb index 16aa221..943bc69 100644 --- a/data/maps/the_talented/metadata.txtpb +++ b/data/maps/the_talented/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Talented" +worldport_entrance { + room: "Main Area" + name: "GREAT" +} diff --git a/data/maps/the_tower/metadata.txtpb b/data/maps/the_tower/metadata.txtpb index dc185e0..3876206 100644 --- a/data/maps/the_tower/metadata.txtpb +++ b/data/maps/the_tower/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Tower" +worldport_entrance { + room: "First Floor" + name: "GREAT" +} diff --git a/data/maps/the_wondrous/metadata.txtpb b/data/maps/the_wondrous/metadata.txtpb index 0b96cf2..1c8e04c 100644 --- a/data/maps/the_wondrous/metadata.txtpb +++ b/data/maps/the_wondrous/metadata.txtpb @@ -1 +1,5 @@ display_name: "The Wondrous" +worldport_entrance { + room: "Entry" + name: "DAEDALUS" +} diff --git a/proto/data.proto b/proto/data.proto index d79f47d..a9e1d0d 100644 --- a/proto/data.proto +++ b/proto/data.proto @@ -264,6 +264,7 @@ message Map { optional uint64 id = 1; optional string name = 2; optional string display_name = 3; + optional uint64 worldport_entrance = 4; } message Progressive { diff --git a/proto/human.proto b/proto/human.proto index 8e7767a..c8d653f 100644 --- a/proto/human.proto +++ b/proto/human.proto @@ -217,6 +217,7 @@ message HumanRoom { message HumanMap { optional string display_name = 1; repeated string excluded_nodes = 2; + optional PortIdentifier worldport_entrance = 3; } message HumanProgressive { diff --git a/tools/datapacker/main.cpp b/tools/datapacker/main.cpp index e807d74..9b487e4 100644 --- a/tools/datapacker/main.cpp +++ b/tools/datapacker/main.cpp @@ -91,6 +91,13 @@ class DataPacker { if (metadata.has_display_name()) { map.set_display_name(metadata.display_name()); } + + if (metadata.has_worldport_entrance()) { + map.set_worldport_entrance(container_.FindOrAddPort( + metadata.worldport_entrance().map(), + metadata.worldport_entrance().room(), + metadata.worldport_entrance().name(), map_name, std::nullopt)); + } } void ProcessRooms(std::filesystem::path path, diff --git a/tools/validator/human_processor.cpp b/tools/validator/human_processor.cpp index 2c978bf..de80db0 100644 --- a/tools/validator/human_processor.cpp +++ b/tools/validator/human_processor.cpp @@ -77,6 +77,17 @@ class HumanProcessor { for (const std::string& path : metadata.excluded_nodes()) { map_info.game_nodes[path].uses++; } + + if (metadata.has_worldport_entrance()) { + auto port_identifier = GetCompletePortIdentifier( + metadata.worldport_entrance(), current_map_name, std::nullopt); + if (port_identifier) { + PortInfo& port_info = info_.ports[*port_identifier]; + port_info.map_worldport_entrances.push_back(current_map_name); + } else { + map_info.malformed_worldport_entrance = metadata.worldport_entrance(); + } + } } void ProcessRooms(std::filesystem::path path, diff --git a/tools/validator/structs.h b/tools/validator/structs.h index d1d45f2..a6787cf 100644 --- a/tools/validator/structs.h +++ b/tools/validator/structs.h @@ -27,6 +27,8 @@ struct GameNodeInfo { struct MapInfo { std::map game_nodes; + + std::optional malformed_worldport_entrance; }; struct RoomInfo { @@ -57,6 +59,7 @@ struct PortInfo { std::vector connections_referenced_by; std::vector target_connections_referenced_by; + std::vector map_worldport_entrances; }; struct PaintingInfo { diff --git a/tools/validator/validator.cpp b/tools/validator/validator.cpp index 93efdc6..c048bab 100644 --- a/tools/validator/validator.cpp +++ b/tools/validator/validator.cpp @@ -69,6 +69,11 @@ class Validator { << " is not defined in the game file." << std::endl; } } + + if (map_info.malformed_worldport_entrance) { + std::cout << "The worldport entrance for map " << map_name + << " is malformed." << std::endl; + } } void ValidateRoom(const RoomIdentifier& room_identifier, @@ -253,6 +258,10 @@ class Validator { std::cout << " CONNECTION " << connection.ShortDebugString() << std::endl; } + + for (const std::string& map_name : port_info.map_worldport_entrances) { + std::cout << " MAP (worldport_entrance) " << map_name << std::endl; + } } else if (port_info.definitions.size() > 1) { std::cout << "Port " << port_identifier.ShortDebugString() << " was defined multiple times." << std::endl; @@ -283,8 +292,7 @@ class Validator { } if (!port.has_rotation()) { std::cout << "Port " << port_identifier.ShortDebugString() - << " is shuffleable and missing a rotation." - << std::endl; + << " is shuffleable and missing a rotation." << std::endl; } } } -- cgit 1.4.1