diff options
| -rw-r--r-- | src/game_data.cpp | 29 | ||||
| -rw-r--r-- | src/game_data.h | 1 |
2 files changed, 1 insertions, 29 deletions
| diff --git a/src/game_data.cpp b/src/game_data.cpp index 7ce1fb6..94b9888 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp | |||
| @@ -29,7 +29,6 @@ struct GameData { | |||
| 29 | std::map<std::string, int> painting_by_id_; | 29 | std::map<std::string, int> painting_by_id_; |
| 30 | 30 | ||
| 31 | std::vector<int> door_definition_order_; | 31 | std::vector<int> door_definition_order_; |
| 32 | std::vector<int> room_definition_order_; | ||
| 33 | 32 | ||
| 34 | std::map<std::string, int> room_by_painting_; | 33 | std::map<std::string, int> room_by_painting_; |
| 35 | std::map<int, int> room_by_sunwarp_; | 34 | std::map<int, int> room_by_sunwarp_; |
| @@ -92,7 +91,6 @@ struct GameData { | |||
| 92 | 91 | ||
| 93 | for (const auto &room_it : lingo_config) { | 92 | for (const auto &room_it : lingo_config) { |
| 94 | int room_id = AddOrGetRoom(room_it.first.as<std::string>()); | 93 | int room_id = AddOrGetRoom(room_it.first.as<std::string>()); |
| 95 | room_definition_order_.push_back(room_id); | ||
| 96 | 94 | ||
| 97 | for (const auto &entrance_it : room_it.second["entrances"]) { | 95 | for (const auto &entrance_it : room_it.second["entrances"]) { |
| 98 | int from_room_id = AddOrGetRoom(entrance_it.first.as<std::string>()); | 96 | int from_room_id = AddOrGetRoom(entrance_it.first.as<std::string>()); |
| @@ -780,31 +778,6 @@ struct GameData { | |||
| 780 | } | 778 | } |
| 781 | } | 779 | } |
| 782 | 780 | ||
| 783 | // As a workaround for a generator bug in 0.5.1, we are going to remove the | ||
| 784 | // panel door requirement on panels that are defined earlier in the file than | ||
| 785 | // the panel door is. This results in logic that matches the generator, even | ||
| 786 | // if it is not true to how the game should work. This will be reverted once | ||
| 787 | // the logic bug is fixed and released. | ||
| 788 | // See: https://github.com/ArchipelagoMW/Archipelago/pull/4342 | ||
| 789 | for (Panel& panel : panels_) { | ||
| 790 | if (panel.panel_door == -1) { | ||
| 791 | continue; | ||
| 792 | } | ||
| 793 | const PanelDoor &panel_door = panel_doors_[panel.panel_door]; | ||
| 794 | for (int room_id : room_definition_order_) { | ||
| 795 | if (room_id == panel_door.room) { | ||
| 796 | // The panel door was defined first (or at the same time as the panel), | ||
| 797 | // so we're good. | ||
| 798 | break; | ||
| 799 | } else if (room_id == panel.room) { | ||
| 800 | // The panel was defined first, so we have to pretend the panel door is | ||
| 801 | // not required for this panel. | ||
| 802 | panel.panel_door = -1; | ||
| 803 | break; | ||
| 804 | } | ||
| 805 | } | ||
| 806 | } | ||
| 807 | |||
| 808 | // Report errors. | 781 | // Report errors. |
| 809 | for (const std::string &area : malconfigured_areas_) { | 782 | for (const std::string &area : malconfigured_areas_) { |
| 810 | TrackerLog(fmt::format("Area data not found for: {}", area)); | 783 | TrackerLog(fmt::format("Area data not found for: {}", area)); |
| @@ -937,7 +910,7 @@ struct GameData { | |||
| 937 | if (!panel_doors_by_id_.count(full_name)) { | 910 | if (!panel_doors_by_id_.count(full_name)) { |
| 938 | int panel_door_id = panel_doors_.size(); | 911 | int panel_door_id = panel_doors_.size(); |
| 939 | panel_doors_by_id_[full_name] = panel_door_id; | 912 | panel_doors_by_id_[full_name] = panel_door_id; |
| 940 | panel_doors_.push_back({.room = AddOrGetRoom(room)}); | 913 | panel_doors_.push_back({}); |
| 941 | } | 914 | } |
| 942 | 915 | ||
| 943 | return panel_doors_by_id_[full_name]; | 916 | return panel_doors_by_id_[full_name]; |
| diff --git a/src/game_data.h b/src/game_data.h index 44084d9..ac911e5 100644 --- a/src/game_data.h +++ b/src/game_data.h | |||
| @@ -86,7 +86,6 @@ struct Door { | |||
| 86 | }; | 86 | }; |
| 87 | 87 | ||
| 88 | struct PanelDoor { | 88 | struct PanelDoor { |
| 89 | int room; | ||
| 90 | int ap_item_id = -1; | 89 | int ap_item_id = -1; |
| 91 | int group_ap_item_id = -1; | 90 | int group_ap_item_id = -1; |
| 92 | std::vector<ProgressiveRequirement> progressives; | 91 | std::vector<ProgressiveRequirement> progressives; |
