about summary refs log tree commit diff stats
path: root/src/tracker_panel.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-09-08 08:51:43 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-09-08 08:51:43 -0400
commit0e6be5bbe8c506882e8100ccaaf13a5f58079f97 (patch)
tree4fee4d578e7936cb4052a74b93064c5ea845521f /src/tracker_panel.cpp
parentc443acfd0b25b3e4f3446f795777b8dd18b00e2b (diff)
parent86b4b06e78c5c71588c1b55273969a1327a6710a (diff)
downloadlingo-ap-tracker-0e6be5bbe8c506882e8100ccaaf13a5f58079f97.tar.gz
lingo-ap-tracker-0e6be5bbe8c506882e8100ccaaf13a5f58079f97.tar.bz2
lingo-ap-tracker-0e6be5bbe8c506882e8100ccaaf13a5f58079f97.zip
Merge branch 'main' into panels
Diffstat (limited to 'src/tracker_panel.cpp')
-rw-r--r--src/tracker_panel.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index 2e1497b..27e825a 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp
@@ -180,7 +180,7 @@ void TrackerPanel::Redraw() {
180 for (AreaIndicator &area : areas_) { 180 for (AreaIndicator &area : areas_) {
181 const MapArea &map_area = GD_GetMapArea(area.area_id); 181 const MapArea &map_area = GD_GetMapArea(area.area_id);
182 if (panels_mode_) { 182 if (panels_mode_) {
183 area.active = map_area.panel; 183 area.active = map_area.has_single_panel;
184 } else if (!AP_IsLocationVisible(map_area.classification) && 184 } else if (!AP_IsLocationVisible(map_area.classification) &&
185 !(map_area.hunt && GetTrackerConfig().show_hunt_panels) && 185 !(map_area.hunt && GetTrackerConfig().show_hunt_panels) &&
186 !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) { 186 !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) {
@@ -200,11 +200,14 @@ void TrackerPanel::Redraw() {
200 if (IsLocationWinCondition(section)) { 200 if (IsLocationWinCondition(section)) {
201 has_unchecked = !AP_HasReachedGoal(); 201 has_unchecked = !AP_HasReachedGoal();
202 } else if (panels_mode_) { 202 } else if (panels_mode_) {
203 has_unchecked = section.panel && std::any_of( 203 if (section.single_panel) {
204 section.panels.begin(), section.panels.end(), [this](int panel_id) { 204 const Panel &panel = GD_GetPanel(*section.single_panel);
205 const Panel &panel = GD_GetPanel(panel_id); 205 if (panel.non_counting) {
206 return !solved_panels_.contains(panel.nodepath); 206 has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id);
207 }); 207 } else {
208 has_unchecked = !solved_panels_.contains(panel.nodepath);
209 }
210 }
208 } else if (AP_IsLocationVisible(section.classification)) { 211 } else if (AP_IsLocationVisible(section.classification)) {
209 has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id); 212 has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id);
210 } else if (section.hunt && GetTrackerConfig().show_hunt_panels) { 213 } else if (section.hunt && GetTrackerConfig().show_hunt_panels) {
@@ -223,9 +226,8 @@ void TrackerPanel::Redraw() {
223 if (AP_IsPaintingShuffle() && !panels_mode_) { 226 if (AP_IsPaintingShuffle() && !panels_mode_) {
224 for (int painting_id : map_area.paintings) { 227 for (int painting_id : map_area.paintings) {
225 const PaintingExit &painting = GD_GetPaintingExit(painting_id); 228 const PaintingExit &painting = GD_GetPaintingExit(painting_id);
226 if (!AP_IsPaintingChecked(painting.internal_id)) { 229 bool reachable = IsPaintingReachable(painting_id);
227 bool reachable = IsPaintingReachable(painting_id); 230 if (!reachable || !AP_IsPaintingChecked(painting.internal_id)) {
228
229 if (reachable) { 231 if (reachable) {
230 has_reachable_unchecked = true; 232 has_reachable_unchecked = true;
231 } else { 233 } else {