diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-09-28 13:48:57 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-09-28 13:48:57 -0400 |
commit | 18eccff16c3cd97ee02685d753ffefbaa7bbbb4c (patch) | |
tree | 5c1abfc991415a8f2a58f18cd70e6793cebd600e | |
parent | d3654cb4846f186486ebf7ac205a2d677a930440 (diff) | |
download | lingo-ap-tracker-18eccff16c3cd97ee02685d753ffefbaa7bbbb4c.tar.gz lingo-ap-tracker-18eccff16c3cd97ee02685d753ffefbaa7bbbb4c.tar.bz2 lingo-ap-tracker-18eccff16c3cd97ee02685d753ffefbaa7bbbb4c.zip |
Added early color hallways support v0.5.3
-rw-r--r-- | src/ap_state.cpp | 6 | ||||
-rw-r--r-- | src/ap_state.h | 2 | ||||
-rw-r--r-- | src/tracker_state.cpp | 5 |
3 files changed, 13 insertions, 0 deletions
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 { | |||
59 | int level_2_requirement = 223; | 59 | int level_2_requirement = 223; |
60 | LocationChecks location_checks = kNORMAL_LOCATIONS; | 60 | LocationChecks location_checks = kNORMAL_LOCATIONS; |
61 | VictoryCondition victory_condition = kTHE_END; | 61 | VictoryCondition victory_condition = kTHE_END; |
62 | bool early_color_hallways = false; | ||
62 | 63 | ||
63 | std::map<std::string, std::string> painting_mapping; | 64 | std::map<std::string, std::string> painting_mapping; |
64 | 65 | ||
@@ -119,6 +120,7 @@ struct APState { | |||
119 | level_2_requirement = 223; | 120 | level_2_requirement = 223; |
120 | location_checks = kNORMAL_LOCATIONS; | 121 | location_checks = kNORMAL_LOCATIONS; |
121 | victory_condition = kTHE_END; | 122 | victory_condition = kTHE_END; |
123 | early_color_hallways = false; | ||
122 | 124 | ||
123 | connected = false; | 125 | connected = false; |
124 | has_connection_result = false; | 126 | has_connection_result = false; |
@@ -211,6 +213,8 @@ struct APState { | |||
211 | location_checks = slot_data["location_checks"].get<LocationChecks>(); | 213 | location_checks = slot_data["location_checks"].get<LocationChecks>(); |
212 | victory_condition = | 214 | victory_condition = |
213 | slot_data["victory_condition"].get<VictoryCondition>(); | 215 | slot_data["victory_condition"].get<VictoryCondition>(); |
216 | early_color_hallways = slot_data.contains("early_color_hallways") && | ||
217 | slot_data["early_color_hallways"].get<int>() == 1; | ||
214 | 218 | ||
215 | if (painting_shuffle && slot_data.contains("painting_entrance_to_exit")) { | 219 | if (painting_shuffle && slot_data.contains("painting_entrance_to_exit")) { |
216 | painting_mapping.clear(); | 220 | painting_mapping.clear(); |
@@ -394,3 +398,5 @@ VictoryCondition AP_GetVictoryCondition() { | |||
394 | bool AP_HasAchievement(const std::string& achievement_name) { | 398 | bool AP_HasAchievement(const std::string& achievement_name) { |
395 | return GetState().HasAchievement(achievement_name); | 399 | return GetState().HasAchievement(achievement_name); |
396 | } | 400 | } |
401 | |||
402 | 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(); | |||
40 | 40 | ||
41 | bool AP_HasAchievement(const std::string& achievement_name); | 41 | bool AP_HasAchievement(const std::string& achievement_name); |
42 | 42 | ||
43 | bool AP_HasEarlyColorHallways(); | ||
44 | |||
43 | #endif /* end of include guard: AP_STATE_H_664A4180 */ | 45 | #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() { | |||
148 | std::list<Exit> flood_boundary; | 148 | std::list<Exit> flood_boundary; |
149 | flood_boundary.push_back({.destination_room = GD_GetRoomByName("Menu")}); | 149 | flood_boundary.push_back({.destination_room = GD_GetRoomByName("Menu")}); |
150 | 150 | ||
151 | if (AP_HasEarlyColorHallways()) { | ||
152 | flood_boundary.push_back( | ||
153 | {.destination_room = GD_GetRoomByName("Outside The Undeterred")}); | ||
154 | } | ||
155 | |||
151 | bool reachable_changed = true; | 156 | bool reachable_changed = true; |
152 | while (reachable_changed) { | 157 | while (reachable_changed) { |
153 | reachable_changed = false; | 158 | reachable_changed = false; |