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.cpp33
1 files changed, 27 insertions, 6 deletions
diff --git a/src/tracker_state.cpp b/src/tracker_state.cpp index 0101e98..d3dde0d 100644 --- a/src/tracker_state.cpp +++ b/src/tracker_state.cpp
@@ -200,7 +200,7 @@ class StateCalculator {
200 case kSUNWARP_ACCESS_PROGRESSIVE: 200 case kSUNWARP_ACCESS_PROGRESSIVE:
201 return IsNonGroupedDoorReachable(door_obj); 201 return IsNonGroupedDoorReachable(door_obj);
202 } 202 }
203 } else if (AP_GetDoorShuffleMode() == kNO_DOORS || door_obj.skip_item) { 203 } else if (AP_GetDoorShuffleMode() != kDOORS_MODE || door_obj.skip_item) {
204 if (!reachable_rooms_.count(door_obj.room)) { 204 if (!reachable_rooms_.count(door_obj.room)) {
205 return kMaybe; 205 return kMaybe;
206 } 206 }
@@ -212,7 +212,7 @@ class StateCalculator {
212 } 212 }
213 213
214 return kYes; 214 return kYes;
215 } else if (AP_GetDoorShuffleMode() == kSIMPLE_DOORS && 215 } else if ((AP_GetDoorShuffleMode() == kDOORS_MODE && AP_AreDoorsGrouped() &&
216 !door_obj.group_name.empty()) { 216 !door_obj.group_name.empty()) {
217 return AP_HasItem(door_obj.group_ap_item_id) ? kYes : kNo; 217 return AP_HasItem(door_obj.group_ap_item_id) ? kYes : kNo;
218 } else { 218 } else {
@@ -302,12 +302,33 @@ class StateCalculator {
302 } 302 }
303 } 303 }
304 304
305 if (AP_IsColorShuffle()) { 305 if (AP_IsColorShuffle()) {
306 for (LingoColor color : panel_obj.colors) { 306 for (LingoColor color : panel_obj.colors) {
307 if (!AP_HasItem(GD_GetItemIdForColor(color))) { 307 if (!AP_HasItem(GD_GetItemIdForColor(color))) {
308 return kNo; 308 return kNo;
309 }
310 }
311 }
312
313 if (panel_obj.panel_door != -1 && AP_GetDoorShuffleMode() == kPANELS_MODE) {
314 const PanelDoor& panel_door_obj = GD_GetPanelDoor(panel_obj.panel_door);
315
316 if (AP_AreDoorsGrouped() && panel_door_obj.group_ap_item_id != -1) {
317 return AP_HasItem(panel_door_obj.group_ap_item_id) ? kYes : kNo;
318 } else {
319 bool has_item = AP_HasItem(panel_door_obj.ap_item_id);
320
321 if (!has_item) {
322 for (const ProgressiveRequirement& prog_req :
323 panel_door_obj.progressives) {
324 if (AP_HasItem(prog_req.ap_item_id, prog_req.quantity)) {
325 has_item = true;
326 break;
327 }
309 } 328 }
310 } 329 }
330
331 return has_item ? kYes : kNo;
311 } 332 }
312 333
313 return kYes; 334 return kYes;