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/validator.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'tools/validator/validator.cpp') 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 { std::cout << "Port " << port_identifier.ShortDebugString() << " was defined multiple times." << std::endl; } + + if (!port_info.target_connections_referenced_by.empty()) { + for (const HumanPort& port : port_info.definitions) { + if (port.has_required_door()) { + std::cout << "Port " << port_identifier.ShortDebugString() + << " has a required door but is the target of a connection:" + << std::endl; + + for (const HumanConnection& connection : + port_info.target_connections_referenced_by) { + std::cout << " CONNECTION " << connection.ShortDebugString() + << std::endl; + } + } + } + } } void ValidatePainting(const PaintingIdentifier& painting_identifier, @@ -279,6 +295,22 @@ class Validator { std::cout << "Painting " << painting_identifier.ShortDebugString() << " was defined multiple times." << std::endl; } + + if (!painting_info.target_connections_referenced_by.empty()) { + for (const HumanPainting& painting : painting_info.definitions) { + if (painting.has_required_door()) { + std::cout << "Painting " << painting_identifier.ShortDebugString() + << " has a required door but is the target of a connection:" + << std::endl; + + for (const HumanConnection& connection : + painting_info.target_connections_referenced_by) { + std::cout << " CONNECTION " << connection.ShortDebugString() + << std::endl; + } + } + } + } } void ValidatePanel(const PanelIdentifier& panel_identifier, @@ -340,6 +372,22 @@ class Validator { std::cout << "Panel " << panel_identifier.ShortDebugString() << " is missing an AP ID." << std::endl; } + + if (!panel_info.target_connections_referenced_by.empty()) { + for (const HumanPanel& panel : panel_info.definitions) { + if (panel.has_required_door()) { + std::cout << "Panel " << panel_identifier.ShortDebugString() + << " has a required door but is the target of a connection:" + << std::endl; + + for (const HumanConnection& connection : + panel_info.target_connections_referenced_by) { + std::cout << " CONNECTION " << connection.ShortDebugString() + << std::endl; + } + } + } + } } void ValidateKeyholder(const KeyholderIdentifier& keyholder_identifier, -- cgit 1.4.1