diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-11-26 15:15:50 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-11-26 15:15:50 -0500 |
commit | 1ae8293937501c3628afb7c02810aac33b832218 (patch) | |
tree | 345877810e89eb284574a40bfaba8030d0eaee7c /src/ap_state.cpp | |
parent | 9bef147ae92afbb8803d98bee6b2be3385c948a2 (diff) | |
parent | 0e6be5bbe8c506882e8100ccaaf13a5f58079f97 (diff) | |
download | lingo-ap-tracker-1ae8293937501c3628afb7c02810aac33b832218.tar.gz lingo-ap-tracker-1ae8293937501c3628afb7c02810aac33b832218.tar.bz2 lingo-ap-tracker-1ae8293937501c3628afb7c02810aac33b832218.zip |
Merge branch 'panels'
Diffstat (limited to 'src/ap_state.cpp')
-rw-r--r-- | src/ap_state.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ap_state.cpp b/src/ap_state.cpp index f8d4ee0..fbd8d12 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp | |||
@@ -60,6 +60,7 @@ struct APState { | |||
60 | std::optional<std::tuple<int, int>> player_pos; | 60 | std::optional<std::tuple<int, int>> player_pos; |
61 | 61 | ||
62 | DoorShuffleMode door_shuffle_mode = kNO_DOORS; | 62 | DoorShuffleMode door_shuffle_mode = kNO_DOORS; |
63 | bool group_doors = false; | ||
63 | bool color_shuffle = false; | 64 | bool color_shuffle = false; |
64 | bool painting_shuffle = false; | 65 | bool painting_shuffle = false; |
65 | int mastery_requirement = 21; | 66 | int mastery_requirement = 21; |
@@ -140,6 +141,7 @@ struct APState { | |||
140 | player_pos = std::nullopt; | 141 | player_pos = std::nullopt; |
141 | victory_data_storage_key.clear(); | 142 | victory_data_storage_key.clear(); |
142 | door_shuffle_mode = kNO_DOORS; | 143 | door_shuffle_mode = kNO_DOORS; |
144 | group_doors = false; | ||
143 | color_shuffle = false; | 145 | color_shuffle = false; |
144 | painting_shuffle = false; | 146 | painting_shuffle = false; |
145 | painting_mapping.clear(); | 147 | painting_mapping.clear(); |
@@ -236,6 +238,17 @@ struct APState { | |||
236 | data_storage_prefix = | 238 | data_storage_prefix = |
237 | fmt::format("Lingo_{}_", apclient->get_player_number()); | 239 | fmt::format("Lingo_{}_", apclient->get_player_number()); |
238 | door_shuffle_mode = slot_data["shuffle_doors"].get<DoorShuffleMode>(); | 240 | door_shuffle_mode = slot_data["shuffle_doors"].get<DoorShuffleMode>(); |
241 | if (slot_data.contains("group_doors")) { | ||
242 | group_doors = slot_data.contains("group_doors") && | ||
243 | slot_data["group_doors"].get<int>() == 1; | ||
244 | } else { | ||
245 | // If group_doors doesn't exist yet, that means kPANELS_MODE is actually | ||
246 | // kSIMPLE_DOORS. | ||
247 | if (door_shuffle_mode == kPANELS_MODE) { | ||
248 | door_shuffle_mode = kDOORS_MODE; | ||
249 | group_doors = true; | ||
250 | } | ||
251 | } | ||
239 | color_shuffle = slot_data["shuffle_colors"].get<int>() == 1; | 252 | color_shuffle = slot_data["shuffle_colors"].get<int>() == 1; |
240 | painting_shuffle = slot_data["shuffle_paintings"].get<int>() == 1; | 253 | painting_shuffle = slot_data["shuffle_paintings"].get<int>() == 1; |
241 | mastery_requirement = slot_data["mastery_achievements"].get<int>(); | 254 | mastery_requirement = slot_data["mastery_achievements"].get<int>(); |
@@ -534,6 +547,8 @@ std::string AP_GetItemName(int item_id) { | |||
534 | 547 | ||
535 | DoorShuffleMode AP_GetDoorShuffleMode() { return GetState().door_shuffle_mode; } | 548 | DoorShuffleMode AP_GetDoorShuffleMode() { return GetState().door_shuffle_mode; } |
536 | 549 | ||
550 | bool AP_AreDoorsGrouped() { return GetState().group_doors; } | ||
551 | |||
537 | bool AP_IsColorShuffle() { return GetState().color_shuffle; } | 552 | bool AP_IsColorShuffle() { return GetState().color_shuffle; } |
538 | 553 | ||
539 | bool AP_IsPaintingShuffle() { return GetState().painting_shuffle; } | 554 | bool AP_IsPaintingShuffle() { return GetState().painting_shuffle; } |