From b6628ef515a57e5ba22aefb3ec5e6f7f60554e41 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 5 May 2023 12:56:06 -0400 Subject: Added support for variable THE MASTER --- tracker_state.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tracker_state.cpp') 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, return false; } + if (panel_obj.name == "THE MASTER") { + int achievements_accessible = 0; + + for (int achieve_id : GetGameData().GetAchievementPanels()) { + if (IsPanelReachable_Helper(achieve_id, reachable_rooms)) { + achievements_accessible++; + + if (achievements_accessible >= AP_GetMasteryRequirement()) { + break; + } + } + } + + return (achievements_accessible >= AP_GetMasteryRequirement()); + } + for (int room_id : panel_obj.required_rooms) { if (!reachable_rooms.count(room_id)) { return false; -- cgit 1.4.1