diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-04-06 17:46:46 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-04-06 17:46:46 -0400 |
commit | 8dfd96bfafa9a7d6405275c0652e9b4977092127 (patch) | |
tree | 8b7cffc0217a8c0903f97e515f7035d5719ff133 | |
parent | 37a2afeca8690af6fbfb22718714e6f62b67ee79 (diff) | |
download | lingo-ap-tracker-8dfd96bfafa9a7d6405275c0652e9b4977092127.tar.gz lingo-ap-tracker-8dfd96bfafa9a7d6405275c0652e9b4977092127.tar.bz2 lingo-ap-tracker-8dfd96bfafa9a7d6405275c0652e9b4977092127.zip |
Properly handle "show all panels" with postgame disabled
-rw-r--r-- | src/area_popup.cpp | 7 | ||||
-rw-r--r-- | src/tracker_panel.cpp | 23 |
2 files changed, 12 insertions, 18 deletions
diff --git a/src/area_popup.cpp b/src/area_popup.cpp index 8ec4dd1..c95e492 100644 --- a/src/area_popup.cpp +++ b/src/area_popup.cpp | |||
@@ -50,11 +50,8 @@ void AreaPopup::ResetIndicators() { | |||
50 | for (int section_id = 0; section_id < map_area.locations.size(); | 50 | for (int section_id = 0; section_id < map_area.locations.size(); |
51 | section_id++) { | 51 | section_id++) { |
52 | const Location& location = map_area.locations.at(section_id); | 52 | const Location& location = map_area.locations.at(section_id); |
53 | if (IsLocationPostgame(location.ap_location_id)) { | 53 | if ((!AP_IsLocationVisible(location.classification) || |
54 | continue; | 54 | IsLocationPostgame(location.ap_location_id)) && |
55 | } | ||
56 | |||
57 | if (!AP_IsLocationVisible(location.classification) && | ||
58 | !(location.hunt && | 55 | !(location.hunt && |
59 | GetTrackerConfig().visible_panels == TrackerConfig::kHUNT_PANELS) && | 56 | GetTrackerConfig().visible_panels == TrackerConfig::kHUNT_PANELS) && |
60 | !(location.single_panel && | 57 | !(location.single_panel && |
diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index 0a756e6..ddb4df9 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp | |||
@@ -55,15 +55,13 @@ void TrackerPanel::UpdateIndicators(bool reset) { | |||
55 | for (AreaIndicator &area : areas_) { | 55 | for (AreaIndicator &area : areas_) { |
56 | const MapArea &map_area = GD_GetMapArea(area.area_id); | 56 | const MapArea &map_area = GD_GetMapArea(area.area_id); |
57 | 57 | ||
58 | if (IsAreaPostgame(area.area_id)) { | 58 | if ((!AP_IsLocationVisible(map_area.classification) || |
59 | area.active = false; | 59 | IsAreaPostgame(area.area_id)) && |
60 | } else if (!AP_IsLocationVisible(map_area.classification) && | 60 | !(map_area.hunt && |
61 | !(map_area.hunt && GetTrackerConfig().visible_panels == | 61 | GetTrackerConfig().visible_panels == TrackerConfig::kHUNT_PANELS) && |
62 | TrackerConfig::kHUNT_PANELS) && | 62 | !(map_area.has_single_panel && |
63 | !(map_area.has_single_panel && | 63 | GetTrackerConfig().visible_panels == TrackerConfig::kALL_PANELS) && |
64 | GetTrackerConfig().visible_panels == | 64 | !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) { |
65 | TrackerConfig::kALL_PANELS) && | ||
66 | !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) { | ||
67 | area.active = false; | 65 | area.active = false; |
68 | } else { | 66 | } else { |
69 | area.active = true; | 67 | area.active = true; |
@@ -233,11 +231,10 @@ void TrackerPanel::Redraw() { | |||
233 | bool has_unreachable_unchecked = false; | 231 | bool has_unreachable_unchecked = false; |
234 | for (const Location §ion : map_area.locations) { | 232 | for (const Location §ion : map_area.locations) { |
235 | bool has_unchecked = false; | 233 | bool has_unchecked = false; |
236 | if (IsLocationPostgame(section.ap_location_id)) { | 234 | if (IsLocationWinCondition(section)) { |
237 | // Nope. | ||
238 | } else if (IsLocationWinCondition(section)) { | ||
239 | has_unchecked = !AP_HasReachedGoal(); | 235 | has_unchecked = !AP_HasReachedGoal(); |
240 | } else if (AP_IsLocationVisible(section.classification)) { | 236 | } else if (AP_IsLocationVisible(section.classification) && |
237 | !IsLocationPostgame(section.ap_location_id)) { | ||
241 | has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id); | 238 | has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id); |
242 | } else if ((section.hunt && GetTrackerConfig().visible_panels == | 239 | } else if ((section.hunt && GetTrackerConfig().visible_panels == |
243 | TrackerConfig::kHUNT_PANELS) || | 240 | TrackerConfig::kHUNT_PANELS) || |