about summary refs log tree commit diff stats
path: root/src/ap_state.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-05-29 12:56:29 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-05-29 12:56:29 -0400
commit13d2a129f6972e6e752da9c9cb686a63d5550517 (patch)
treeea0cfe2197c25732dd0d4d0f0e37717fd977792f /src/ap_state.cpp
parentd3e2d9518403eb89eb150fa2158966c3483d5339 (diff)
downloadlingo-ap-tracker-13d2a129f6972e6e752da9c9cb686a63d5550517.tar.gz
lingo-ap-tracker-13d2a129f6972e6e752da9c9cb686a63d5550517.tar.bz2
lingo-ap-tracker-13d2a129f6972e6e752da9c9cb686a63d5550517.zip
Show unchecked paintings
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; }