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.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ap_state.cpp b/src/ap_state.cpp index 20245e5..0c75eae 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp
@@ -427,6 +427,14 @@ struct APState {
427 return std::any_cast<const std::set<std::string>&>(data_storage.at(key)); 427 return std::any_cast<const std::set<std::string>&>(data_storage.at(key));
428 } 428 }
429 429
430 bool IsPaintingChecked(const std::string& painting_id) {
431 const auto& checked_paintings = GetCheckedPaintings();
432
433 return checked_paintings.count(painting_id) ||
434 (painting_mapping.count(painting_id) &&
435 checked_paintings.count(painting_mapping.at(painting_id)));
436 }
437
430 void RefreshTracker(bool reset) { 438 void RefreshTracker(bool reset) {
431 wxLogVerbose("Refreshing display..."); 439 wxLogVerbose("Refreshing display...");
432 440
@@ -506,6 +514,10 @@ const std::set<std::string>& AP_GetCheckedPaintings() {
506 return GetState().GetCheckedPaintings(); 514 return GetState().GetCheckedPaintings();
507} 515}
508 516
517bool AP_IsPaintingChecked(const std::string& painting_id) {
518 return GetState().IsPaintingChecked(painting_id);
519}
520
509int AP_GetMasteryRequirement() { return GetState().mastery_requirement; } 521int AP_GetMasteryRequirement() { return GetState().mastery_requirement; }
510 522
511int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } 523int AP_GetLevel2Requirement() { return GetState().level_2_requirement; }