From 18eccff16c3cd97ee02685d753ffefbaa7bbbb4c Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 28 Sep 2023 13:48:57 -0400 Subject: Added early color hallways support --- src/ap_state.cpp | 6 ++++++ src/ap_state.h | 2 ++ src/tracker_state.cpp | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/src/ap_state.cpp b/src/ap_state.cpp index 8bc7ed0..50601d4 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp @@ -59,6 +59,7 @@ struct APState { int level_2_requirement = 223; LocationChecks location_checks = kNORMAL_LOCATIONS; VictoryCondition victory_condition = kTHE_END; + bool early_color_hallways = false; std::map painting_mapping; @@ -119,6 +120,7 @@ struct APState { level_2_requirement = 223; location_checks = kNORMAL_LOCATIONS; victory_condition = kTHE_END; + early_color_hallways = false; connected = false; has_connection_result = false; @@ -211,6 +213,8 @@ struct APState { location_checks = slot_data["location_checks"].get(); victory_condition = slot_data["victory_condition"].get(); + early_color_hallways = slot_data.contains("early_color_hallways") && + slot_data["early_color_hallways"].get() == 1; if (painting_shuffle && slot_data.contains("painting_entrance_to_exit")) { painting_mapping.clear(); @@ -394,3 +398,5 @@ VictoryCondition AP_GetVictoryCondition() { bool AP_HasAchievement(const std::string& achievement_name) { return GetState().HasAchievement(achievement_name); } + +bool AP_HasEarlyColorHallways() { return GetState().early_color_hallways; } diff --git a/src/ap_state.h b/src/ap_state.h index 64caeea..3fd51aa 100644 --- a/src/ap_state.h +++ b/src/ap_state.h @@ -40,4 +40,6 @@ VictoryCondition AP_GetVictoryCondition(); bool AP_HasAchievement(const std::string& achievement_name); +bool AP_HasEarlyColorHallways(); + #endif /* end of include guard: AP_STATE_H_664A4180 */ diff --git a/src/tracker_state.cpp b/src/tracker_state.cpp index 0976461..002f447 100644 --- a/src/tracker_state.cpp +++ b/src/tracker_state.cpp @@ -148,6 +148,11 @@ void RecalculateReachability() { std::list flood_boundary; flood_boundary.push_back({.destination_room = GD_GetRoomByName("Menu")}); + if (AP_HasEarlyColorHallways()) { + flood_boundary.push_back( + {.destination_room = GD_GetRoomByName("Outside The Undeterred")}); + } + bool reachable_changed = true; while (reachable_changed) { reachable_changed = false; -- cgit 1.4.1