about summary refs log tree commit diff stats
path: root/tracker_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tracker_state.cpp')
-rw-r--r--tracker_state.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tracker_state.cpp b/tracker_state.cpp index 169d301..4921d3f 100644 --- a/tracker_state.cpp +++ b/tracker_state.cpp
@@ -58,7 +58,18 @@ bool IsDoorReachable_Helper(int door_id, const std::set<int>& reachable_rooms) {
58 !door_obj.group_name.empty()) { 58 !door_obj.group_name.empty()) {
59 return GetAPState().HasItem(door_obj.group_name); 59 return GetAPState().HasItem(door_obj.group_name);
60 } else { 60 } else {
61 return GetAPState().HasItem(door_obj.item_name); 61 bool has_item = GetAPState().HasItem(door_obj.item_name);
62
63 if (!has_item) {
64 for (const ProgressiveRequirement& prog_req : door_obj.progressives) {
65 if (GetAPState().HasItem(prog_req.item_name, prog_req.quantity)) {
66 has_item = true;
67 break;
68 }
69 }
70 }
71
72 return has_item;
62 } 73 }
63} 74}
64 75