From 8dfd96bfafa9a7d6405275c0652e9b4977092127 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 6 Apr 2025 17:46:46 -0400 Subject: Properly handle "show all panels" with postgame disabled --- src/area_popup.cpp | 7 ++----- 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() { for (int section_id = 0; section_id < map_area.locations.size(); section_id++) { const Location& location = map_area.locations.at(section_id); - if (IsLocationPostgame(location.ap_location_id)) { - continue; - } - - if (!AP_IsLocationVisible(location.classification) && + if ((!AP_IsLocationVisible(location.classification) || + IsLocationPostgame(location.ap_location_id)) && !(location.hunt && GetTrackerConfig().visible_panels == TrackerConfig::kHUNT_PANELS) && !(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) { for (AreaIndicator &area : areas_) { const MapArea &map_area = GD_GetMapArea(area.area_id); - if (IsAreaPostgame(area.area_id)) { - area.active = false; - } else if (!AP_IsLocationVisible(map_area.classification) && - !(map_area.hunt && GetTrackerConfig().visible_panels == - TrackerConfig::kHUNT_PANELS) && - !(map_area.has_single_panel && - GetTrackerConfig().visible_panels == - TrackerConfig::kALL_PANELS) && - !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) { + if ((!AP_IsLocationVisible(map_area.classification) || + IsAreaPostgame(area.area_id)) && + !(map_area.hunt && + GetTrackerConfig().visible_panels == TrackerConfig::kHUNT_PANELS) && + !(map_area.has_single_panel && + GetTrackerConfig().visible_panels == TrackerConfig::kALL_PANELS) && + !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) { area.active = false; } else { area.active = true; @@ -233,11 +231,10 @@ void TrackerPanel::Redraw() { bool has_unreachable_unchecked = false; for (const Location §ion : map_area.locations) { bool has_unchecked = false; - if (IsLocationPostgame(section.ap_location_id)) { - // Nope. - } else if (IsLocationWinCondition(section)) { + if (IsLocationWinCondition(section)) { has_unchecked = !AP_HasReachedGoal(); - } else if (AP_IsLocationVisible(section.classification)) { + } else if (AP_IsLocationVisible(section.classification) && + !IsLocationPostgame(section.ap_location_id)) { has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id); } else if ((section.hunt && GetTrackerConfig().visible_panels == TrackerConfig::kHUNT_PANELS) || -- cgit 1.4.1