From fcfefe57d9d0b9d8eb3e149e68605103a9e6b490 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 11 Sep 2025 20:08:32 -0400 Subject: [Data] Fixed connection target required door logic bugs --- tools/validator/human_processor.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'tools/validator/human_processor.cpp') 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 { } } else if (human_connection.has_from()) { ProcessSingleConnection(human_connection, human_connection.from(), - current_map_name); + current_map_name, + /*is_target=*/!human_connection.oneway() && + !human_connection.bypass_target_door()); } if (human_connection.has_to_room()) { @@ -410,8 +412,9 @@ class HumanProcessor { std::cout << "A global connection used to_room." << std::endl; } } else if (human_connection.has_to()) { - ProcessSingleConnection(human_connection, human_connection.to(), - current_map_name); + ProcessSingleConnection( + human_connection, human_connection.to(), current_map_name, + /*is_target=*/!human_connection.bypass_target_door()); } if (human_connection.has_door()) { @@ -432,7 +435,7 @@ class HumanProcessor { void ProcessSingleConnection( const HumanConnection& human_connection, const HumanConnection::Endpoint& endpoint, - const std::optional& current_map_name) { + const std::optional& current_map_name, bool is_target) { if (endpoint.has_room()) { auto room_identifier = GetCompleteRoomIdentifier(endpoint.room(), current_map_name); @@ -451,6 +454,11 @@ class HumanProcessor { if (painting_identifier) { PaintingInfo& painting_info = info_.paintings[*painting_identifier]; painting_info.connections_referenced_by.push_back(human_connection); + + if (is_target) { + painting_info.target_connections_referenced_by.push_back( + human_connection); + } } else { // Not sure where else to store this right now. std::cout @@ -463,6 +471,11 @@ class HumanProcessor { if (port_identifier) { PortInfo& port_info = info_.ports[*port_identifier]; port_info.connections_referenced_by.push_back(human_connection); + + if (is_target) { + port_info.target_connections_referenced_by.push_back( + human_connection); + } } else { // Not sure where else to store this right now. std::cout @@ -480,6 +493,11 @@ class HumanProcessor { panel_info.proxies[endpoint.panel().answer()] .connections_referenced_by.push_back(human_connection); } + + if (is_target) { + panel_info.target_connections_referenced_by.push_back( + human_connection); + } } } } -- cgit 1.4.1