about summary refs log tree commit diff stats
path: root/src/tracker_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tracker_state.cpp')
-rw-r--r--src/tracker_state.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/tracker_state.cpp b/src/tracker_state.cpp index 640a159..1881513 100644 --- a/src/tracker_state.cpp +++ b/src/tracker_state.cpp
@@ -199,7 +199,7 @@ class StateCalculator {
199 case kSUNWARP_ACCESS_PROGRESSIVE: 199 case kSUNWARP_ACCESS_PROGRESSIVE:
200 return IsNonGroupedDoorReachable(door_obj); 200 return IsNonGroupedDoorReachable(door_obj);
201 } 201 }
202 } else if (AP_GetDoorShuffleMode() == kNO_DOORS || door_obj.skip_item) { 202 } else if (AP_GetDoorShuffleMode() != kDOORS_MODE || door_obj.skip_item) {
203 if (!reachable_rooms_.count(door_obj.room)) { 203 if (!reachable_rooms_.count(door_obj.room)) {
204 return kMaybe; 204 return kMaybe;
205 } 205 }
@@ -211,7 +211,7 @@ class StateCalculator {
211 } 211 }
212 212
213 return kYes; 213 return kYes;
214 } else if (AP_GetDoorShuffleMode() == kSIMPLE_DOORS && 214 } else if (AP_GetDoorShuffleMode() == kDOORS_MODE && AP_AreDoorsGrouped() &&
215 !door_obj.group_name.empty()) { 215 !door_obj.group_name.empty()) {
216 return AP_HasItem(door_obj.group_ap_item_id) ? kYes : kNo; 216 return AP_HasItem(door_obj.group_ap_item_id) ? kYes : kNo;
217 } else { 217 } else {
@@ -309,6 +309,28 @@ class StateCalculator {
309 } 309 }
310 } 310 }
311 311
312 if (panel_obj.panel_door != -1 && AP_GetDoorShuffleMode() == kPANELS_MODE) {
313 const PanelDoor& panel_door_obj = GD_GetPanelDoor(panel_obj.panel_door);
314
315 if (AP_AreDoorsGrouped() && panel_door_obj.group_ap_item_id != -1) {
316 return AP_HasItem(panel_door_obj.group_ap_item_id) ? kYes : kNo;
317 } else {
318 bool has_item = AP_HasItem(panel_door_obj.ap_item_id);
319
320 if (!has_item) {
321 for (const ProgressiveRequirement& prog_req :
322 panel_door_obj.progressives) {
323 if (AP_HasItem(prog_req.ap_item_id, prog_req.quantity)) {
324 has_item = true;
325 break;
326 }
327 }
328 }
329
330 return has_item ? kYes : kNo;
331 }
332 }
333
312 return kYes; 334 return kYes;
313 } 335 }
314 336