diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-03 14:09:40 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-03 14:09:40 -0400 |
commit | dc4a14397ae226d91041389c2a47993f9c22f83d (patch) | |
tree | e881fcac382d53961899bd60565ef77422101f6d /ap_state.cpp | |
parent | 02c331f4e766558bba580d5b7db883357be005d5 (diff) | |
download | lingo-ap-tracker-dc4a14397ae226d91041389c2a47993f9c22f83d.tar.gz lingo-ap-tracker-dc4a14397ae226d91041389c2a47993f9c22f83d.tar.bz2 lingo-ap-tracker-dc4a14397ae226d91041389c2a47993f9c22f83d.zip |
Added painting shuffle support
Diffstat (limited to 'ap_state.cpp')
-rw-r--r-- | ap_state.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ap_state.cpp b/ap_state.cpp index 2c8ba0a..8400557 100644 --- a/ap_state.cpp +++ b/ap_state.cpp | |||
@@ -56,6 +56,10 @@ void APState::Connect(std::string server, std::string player, | |||
56 | 56 | ||
57 | inventory_.clear(); | 57 | inventory_.clear(); |
58 | checked_locations_.clear(); | 58 | checked_locations_.clear(); |
59 | door_shuffle_mode_ = kNO_DOORS; | ||
60 | color_shuffle_ = false; | ||
61 | painting_shuffle_ = false; | ||
62 | painting_mapping_.clear(); | ||
59 | 63 | ||
60 | bool connected = false; | 64 | bool connected = false; |
61 | bool has_connection_result = false; | 65 | bool has_connection_result = false; |
@@ -103,6 +107,15 @@ void APState::Connect(std::string server, std::string player, | |||
103 | 107 | ||
104 | door_shuffle_mode_ = slot_data["shuffle_doors"].get<DoorShuffleMode>(); | 108 | door_shuffle_mode_ = slot_data["shuffle_doors"].get<DoorShuffleMode>(); |
105 | color_shuffle_ = slot_data["shuffle_colors"].get<bool>(); | 109 | color_shuffle_ = slot_data["shuffle_colors"].get<bool>(); |
110 | painting_shuffle_ = slot_data["shuffle_paintings"].get<bool>(); | ||
111 | |||
112 | if (painting_shuffle_ && slot_data.contains("painting_entrance_to_exit")) { | ||
113 | painting_mapping_.clear(); | ||
114 | |||
115 | for (const auto& mapping_it : slot_data["painting_entrance_to_exit"].items()) { | ||
116 | painting_mapping_[mapping_it.key()] = mapping_it.value(); | ||
117 | } | ||
118 | } | ||
106 | 119 | ||
107 | connected = true; | 120 | connected = true; |
108 | has_connection_result = true; | 121 | has_connection_result = true; |