about summary refs log tree commit diff stats
path: root/src/ap_state.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ap_state.cpp')
-rw-r--r--src/ap_state.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ap_state.cpp b/src/ap_state.cpp index 0c75eae..0ce4582 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp
@@ -70,6 +70,7 @@ struct APState {
70 bool sunwarp_shuffle = false; 70 bool sunwarp_shuffle = false;
71 71
72 std::map<std::string, std::string> painting_mapping; 72 std::map<std::string, std::string> painting_mapping;
73 std::set<std::string> painting_codomain;
73 std::map<int, SunwarpMapping> sunwarp_mapping; 74 std::map<int, SunwarpMapping> sunwarp_mapping;
74 75
75 void Connect(std::string server, std::string player, std::string password) { 76 void Connect(std::string server, std::string player, std::string password) {
@@ -137,6 +138,7 @@ struct APState {
137 color_shuffle = false; 138 color_shuffle = false;
138 painting_shuffle = false; 139 painting_shuffle = false;
139 painting_mapping.clear(); 140 painting_mapping.clear();
141 painting_codomain.clear();
140 mastery_requirement = 21; 142 mastery_requirement = 21;
141 level_2_requirement = 223; 143 level_2_requirement = 223;
142 location_checks = kNORMAL_LOCATIONS; 144 location_checks = kNORMAL_LOCATIONS;
@@ -253,6 +255,7 @@ struct APState {
253 for (const auto& mapping_it : 255 for (const auto& mapping_it :
254 slot_data["painting_entrance_to_exit"].items()) { 256 slot_data["painting_entrance_to_exit"].items()) {
255 painting_mapping[mapping_it.key()] = mapping_it.value(); 257 painting_mapping[mapping_it.key()] = mapping_it.value();
258 painting_codomain.insert(mapping_it.value());
256 } 259 }
257 } 260 }
258 261
@@ -510,6 +513,10 @@ const std::map<std::string, std::string>& AP_GetPaintingMapping() {
510 return GetState().painting_mapping; 513 return GetState().painting_mapping;
511} 514}
512 515
516bool AP_IsPaintingMappedTo(const std::string& painting_id) {
517 return GetState().painting_codomain.count(painting_id);
518}
519
513const std::set<std::string>& AP_GetCheckedPaintings() { 520const std::set<std::string>& AP_GetCheckedPaintings() {
514 return GetState().GetCheckedPaintings(); 521 return GetState().GetCheckedPaintings();
515} 522}