about summary refs log tree commit diff stats
path: root/src/game_data.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-09 11:14:10 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-09 11:14:10 -0400
commit53a2ec277f20a7c260e80af527659e769f6d2ac6 (patch)
tree93527b1a1458352aa2d35916a3621cd144d48e0c /src/game_data.cpp
parent884549457f8f5d9a13fd575ddf70aa317cd752ed (diff)
downloadlingo-ap-tracker-53a2ec277f20a7c260e80af527659e769f6d2ac6.tar.gz
lingo-ap-tracker-53a2ec277f20a7c260e80af527659e769f6d2ac6.tar.bz2
lingo-ap-tracker-53a2ec277f20a7c260e80af527659e769f6d2ac6.zip
Support reduce_checks
Diffstat (limited to 'src/game_data.cpp')
-rw-r--r--src/game_data.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/game_data.cpp b/src/game_data.cpp index 482818b..f21bc3d 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp
@@ -343,7 +343,8 @@ struct GameData {
343 {.name = panel.name, 343 {.name = panel.name,
344 .ap_location_name = room_name + " - " + panel.name, 344 .ap_location_name = room_name + " - " + panel.name,
345 .room = panel.room, 345 .room = panel.room,
346 .panels = {panel.id}}); 346 .panels = {panel.id},
347 .exclude_reduce = panel.exclude_reduce});
347 } 348 }
348 } 349 }
349 350
@@ -372,7 +373,21 @@ struct GameData {
372 map_area.locations.push_back({.name = section_name, 373 map_area.locations.push_back({.name = section_name,
373 .ap_location_name = door.location_name, 374 .ap_location_name = door.location_name,
374 .room = door.room, 375 .room = door.room,
375 .panels = door.panels}); 376 .panels = door.panels,
377 .exclude_reduce = door.exclude_reduce});
378 }
379 }
380
381 for (MapArea &map_area : map_areas_) {
382 bool all_exclude_reduce = true;
383 for (const Location &location : map_area.locations) {
384 if (!location.exclude_reduce) {
385 all_exclude_reduce = false;
386 break;
387 }
388 }
389 if (all_exclude_reduce) {
390 map_area.exclude_reduce = true;
376 } 391 }
377 } 392 }
378 393