diff options
Diffstat (limited to 'src/tracker_state.cpp')
-rw-r--r-- | src/tracker_state.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/tracker_state.cpp b/src/tracker_state.cpp index e02ee14..9d2c6d1 100644 --- a/src/tracker_state.cpp +++ b/src/tracker_state.cpp | |||
@@ -29,7 +29,7 @@ Decision IsDoorReachable_Helper(int door_id, | |||
29 | const std::set<int>& solveable_panels) { | 29 | const std::set<int>& solveable_panels) { |
30 | const Door& door_obj = GD_GetDoor(door_id); | 30 | const Door& door_obj = GD_GetDoor(door_id); |
31 | 31 | ||
32 | if (AP_GetDoorShuffleMode() == kNO_DOORS || door_obj.skip_item) { | 32 | if (AP_GetDoorShuffleMode() != kDOORS_MODE || door_obj.skip_item) { |
33 | if (!reachable_rooms.count(door_obj.room)) { | 33 | if (!reachable_rooms.count(door_obj.room)) { |
34 | return kMaybe; | 34 | return kMaybe; |
35 | } | 35 | } |
@@ -41,7 +41,7 @@ Decision IsDoorReachable_Helper(int door_id, | |||
41 | } | 41 | } |
42 | 42 | ||
43 | return kYes; | 43 | return kYes; |
44 | } else if (AP_GetDoorShuffleMode() == kSIMPLE_DOORS && | 44 | } else if (AP_GetDoorShuffleMode() == kDOORS_MODE && AP_AreDoorsGrouped() && |
45 | !door_obj.group_name.empty()) { | 45 | !door_obj.group_name.empty()) { |
46 | return AP_HasItem(door_obj.group_ap_item_id) ? kYes : kNo; | 46 | return AP_HasItem(door_obj.group_ap_item_id) ? kYes : kNo; |
47 | } else { | 47 | } else { |
@@ -136,6 +136,28 @@ Decision IsPanelReachable_Helper(int panel_id, | |||
136 | } | 136 | } |
137 | } | 137 | } |
138 | 138 | ||
139 | if (panel_obj.panel_door != -1 && AP_GetDoorShuffleMode() == kPANELS_MODE) { | ||
140 | const PanelDoor& panel_door_obj = GD_GetPanelDoor(panel_obj.panel_door); | ||
141 | |||
142 | if (AP_AreDoorsGrouped() && panel_door_obj.group_ap_item_id != -1) { | ||
143 | return AP_HasItem(panel_door_obj.group_ap_item_id) ? kYes : kNo; | ||
144 | } else { | ||
145 | bool has_item = AP_HasItem(panel_door_obj.ap_item_id); | ||
146 | |||
147 | if (!has_item) { | ||
148 | for (const ProgressiveRequirement& prog_req : | ||
149 | panel_door_obj.progressives) { | ||
150 | if (AP_HasItem(prog_req.ap_item_id, prog_req.quantity)) { | ||
151 | has_item = true; | ||
152 | break; | ||
153 | } | ||
154 | } | ||
155 | } | ||
156 | |||
157 | return has_item ? kYes : kNo; | ||
158 | } | ||
159 | } | ||
160 | |||
139 | return kYes; | 161 | return kYes; |
140 | } | 162 | } |
141 | 163 | ||