From 53a2ec277f20a7c260e80af527659e769f6d2ac6 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 9 May 2023 11:14:10 -0400 Subject: Support reduce_checks --- src/game_data.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/game_data.cpp') 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 { {.name = panel.name, .ap_location_name = room_name + " - " + panel.name, .room = panel.room, - .panels = {panel.id}}); + .panels = {panel.id}, + .exclude_reduce = panel.exclude_reduce}); } } @@ -372,7 +373,21 @@ struct GameData { map_area.locations.push_back({.name = section_name, .ap_location_name = door.location_name, .room = door.room, - .panels = door.panels}); + .panels = door.panels, + .exclude_reduce = door.exclude_reduce}); + } + } + + for (MapArea &map_area : map_areas_) { + bool all_exclude_reduce = true; + for (const Location &location : map_area.locations) { + if (!location.exclude_reduce) { + all_exclude_reduce = false; + break; + } + } + if (all_exclude_reduce) { + map_area.exclude_reduce = true; } } -- cgit 1.4.1