about summary refs log tree commit diff stats
path: root/src/ap_state.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-08-03 11:34:57 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-08-03 11:34:57 -0400
commitc9a21a387634e8fdd13110906ebe786f055c446d (patch)
tree44389e404b729392e997c7b2723479f1539e9173 /src/ap_state.cpp
parentb09e7749e54e21d1ccf45ef51be471e3c6200641 (diff)
downloadlingo-ap-tracker-c9a21a387634e8fdd13110906ebe786f055c446d.tar.gz
lingo-ap-tracker-c9a21a387634e8fdd13110906ebe786f055c446d.tar.bz2
lingo-ap-tracker-c9a21a387634e8fdd13110906ebe786f055c446d.zip
LEVEL 2 and required_panel support
Diffstat (limited to 'src/ap_state.cpp')
-rw-r--r--src/ap_state.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ap_state.cpp b/src/ap_state.cpp index 6c4e42d..02f1f5a 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp
@@ -61,7 +61,9 @@ struct APState {
61 bool color_shuffle = false; 61 bool color_shuffle = false;
62 bool painting_shuffle = false; 62 bool painting_shuffle = false;
63 int mastery_requirement = 21; 63 int mastery_requirement = 21;
64 int level_2_requirement = 223;
64 bool reduce_checks = false; 65 bool reduce_checks = false;
66 VictoryCondition victory_condition = kTHE_END;
65 67
66 std::map<std::string, std::string> painting_mapping; 68 std::map<std::string, std::string> painting_mapping;
67 69
@@ -119,7 +121,9 @@ struct APState {
119 painting_shuffle = false; 121 painting_shuffle = false;
120 painting_mapping.clear(); 122 painting_mapping.clear();
121 mastery_requirement = 21; 123 mastery_requirement = 21;
124 level_2_requirement = 223;
122 reduce_checks = false; 125 reduce_checks = false;
126 victory_condition = kTHE_END;
123 127
124 connected = false; 128 connected = false;
125 has_connection_result = false; 129 has_connection_result = false;
@@ -208,8 +212,11 @@ struct APState {
208 color_shuffle = slot_data["shuffle_colors"].get<bool>(); 212 color_shuffle = slot_data["shuffle_colors"].get<bool>();
209 painting_shuffle = slot_data["shuffle_paintings"].get<bool>(); 213 painting_shuffle = slot_data["shuffle_paintings"].get<bool>();
210 mastery_requirement = slot_data["mastery_achievements"].get<int>(); 214 mastery_requirement = slot_data["mastery_achievements"].get<int>();
215 level_2_requirement = slot_data["level_2_requirement"].get<int>();
211 reduce_checks = (door_shuffle_mode == kNO_DOORS) && 216 reduce_checks = (door_shuffle_mode == kNO_DOORS) &&
212 slot_data["reduce_checks"].get<bool>(); 217 slot_data["reduce_checks"].get<bool>();
218 victory_condition =
219 slot_data["victory_condition"].get<VictoryCondition>();
213 220
214 if (painting_shuffle && slot_data.contains("painting_entrance_to_exit")) { 221 if (painting_shuffle && slot_data.contains("painting_entrance_to_exit")) {
215 painting_mapping.clear(); 222 painting_mapping.clear();
@@ -435,8 +442,14 @@ const std::map<std::string, std::string> AP_GetPaintingMapping() {
435 442
436int AP_GetMasteryRequirement() { return GetState().mastery_requirement; } 443int AP_GetMasteryRequirement() { return GetState().mastery_requirement; }
437 444
445int AP_GetLevel2Requirement() { return GetState().level_2_requirement; }
446
438bool AP_IsReduceChecks() { return GetState().reduce_checks; } 447bool AP_IsReduceChecks() { return GetState().reduce_checks; }
439 448
449VictoryCondition AP_GetVictoryCondition() {
450 return GetState().victory_condition;
451}
452
440bool AP_HasAchievement(const std::string& achievement_name) { 453bool AP_HasAchievement(const std::string& achievement_name) {
441 return GetState().HasAchievement(achievement_name); 454 return GetState().HasAchievement(achievement_name);
442} 455}