about summary refs log tree commit diff stats
path: root/tracker_state.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-05 12:56:06 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-05 12:56:06 -0400
commitb6628ef515a57e5ba22aefb3ec5e6f7f60554e41 (patch)
treee558a3965565e4e504cdc811a0a8bc87274890b1 /tracker_state.cpp
parentdbbde171593492396c702528004d6b49de6c0d51 (diff)
downloadlingo-ap-tracker-b6628ef515a57e5ba22aefb3ec5e6f7f60554e41.tar.gz
lingo-ap-tracker-b6628ef515a57e5ba22aefb3ec5e6f7f60554e41.tar.bz2
lingo-ap-tracker-b6628ef515a57e5ba22aefb3ec5e6f7f60554e41.zip
Added support for variable THE MASTER
Diffstat (limited to 'tracker_state.cpp')
-rw-r--r--tracker_state.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tracker_state.cpp b/tracker_state.cpp index 6eaf87a..858ec3e 100644 --- a/tracker_state.cpp +++ b/tracker_state.cpp
@@ -16,6 +16,22 @@ bool IsPanelReachable_Helper(int panel_id,
16 return false; 16 return false;
17 } 17 }
18 18
19 if (panel_obj.name == "THE MASTER") {
20 int achievements_accessible = 0;
21
22 for (int achieve_id : GetGameData().GetAchievementPanels()) {
23 if (IsPanelReachable_Helper(achieve_id, reachable_rooms)) {
24 achievements_accessible++;
25
26 if (achievements_accessible >= AP_GetMasteryRequirement()) {
27 break;
28 }
29 }
30 }
31
32 return (achievements_accessible >= AP_GetMasteryRequirement());
33 }
34
19 for (int room_id : panel_obj.required_rooms) { 35 for (int room_id : panel_obj.required_rooms) {
20 if (!reachable_rooms.count(room_id)) { 36 if (!reachable_rooms.count(room_id)) {
21 return false; 37 return false;