diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-11 20:08:32 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-11 20:08:32 -0400 |
| commit | fcfefe57d9d0b9d8eb3e149e68605103a9e6b490 (patch) | |
| tree | 415058cc3361727390c4d92ad367ec8c59350974 /tools/validator/human_processor.cpp | |
| parent | 6ba1787f7229125affbf12a94c4ddfb6b2e132b8 (diff) | |
| download | lingo2-archipelago-fcfefe57d9d0b9d8eb3e149e68605103a9e6b490.tar.gz lingo2-archipelago-fcfefe57d9d0b9d8eb3e149e68605103a9e6b490.tar.bz2 lingo2-archipelago-fcfefe57d9d0b9d8eb3e149e68605103a9e6b490.zip | |
[Data] Fixed connection target required door logic bugs
Diffstat (limited to 'tools/validator/human_processor.cpp')
| -rw-r--r-- | tools/validator/human_processor.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
| 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 | } |
