diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-03 17:25:41 -0400 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-03 17:25:41 -0400 |
| commit | 08ffb400114029569b4043b4f4c5a3f2af9b37b8 (patch) | |
| tree | be79e53b617230007fe64c0fd1a900ef8c8434d2 /tracker_state.cpp | |
| parent | f960478d05222fc54f466fc863983fcc3a5eaaeb (diff) | |
| download | lingo-ap-tracker-08ffb400114029569b4043b4f4c5a3f2af9b37b8.tar.gz lingo-ap-tracker-08ffb400114029569b4043b4f4c5a3f2af9b37b8.tar.bz2 lingo-ap-tracker-08ffb400114029569b4043b4f4c5a3f2af9b37b8.zip | |
Added progressive items
Diffstat (limited to 'tracker_state.cpp')
| -rw-r--r-- | tracker_state.cpp | 13 |
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 | ||
