about summary refs log tree commit diff stats
path: root/ap_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ap_state.cpp')
-rw-r--r--ap_state.cpp13
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;