From dc4a14397ae226d91041389c2a47993f9c22f83d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 3 May 2023 14:09:40 -0400 Subject: Added painting shuffle support --- ap_state.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'ap_state.cpp') 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, inventory_.clear(); checked_locations_.clear(); + door_shuffle_mode_ = kNO_DOORS; + color_shuffle_ = false; + painting_shuffle_ = false; + painting_mapping_.clear(); bool connected = false; bool has_connection_result = false; @@ -103,6 +107,15 @@ void APState::Connect(std::string server, std::string player, door_shuffle_mode_ = slot_data["shuffle_doors"].get(); color_shuffle_ = slot_data["shuffle_colors"].get(); + painting_shuffle_ = slot_data["shuffle_paintings"].get(); + + if (painting_shuffle_ && slot_data.contains("painting_entrance_to_exit")) { + painting_mapping_.clear(); + + for (const auto& mapping_it : slot_data["painting_entrance_to_exit"].items()) { + painting_mapping_[mapping_it.key()] = mapping_it.value(); + } + } connected = true; has_connection_result = true; -- cgit 1.4.1