From 13d2a129f6972e6e752da9c9cb686a63d5550517 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 29 May 2024 12:56:29 -0400 Subject: Show unchecked paintings --- src/ap_state.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ap_state.cpp') 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 { return std::any_cast&>(data_storage.at(key)); } + bool IsPaintingChecked(const std::string& painting_id) { + const auto& checked_paintings = GetCheckedPaintings(); + + return checked_paintings.count(painting_id) || + (painting_mapping.count(painting_id) && + checked_paintings.count(painting_mapping.at(painting_id))); + } + void RefreshTracker(bool reset) { wxLogVerbose("Refreshing display..."); @@ -506,6 +514,10 @@ const std::set& AP_GetCheckedPaintings() { return GetState().GetCheckedPaintings(); } +bool AP_IsPaintingChecked(const std::string& painting_id) { + return GetState().IsPaintingChecked(painting_id); +} + int AP_GetMasteryRequirement() { return GetState().mastery_requirement; } int AP_GetLevel2Requirement() { return GetState().level_2_requirement; } -- cgit 1.4.1