From 4adfe42a300a597cf8e7036cd189d197b08a7f01 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 17 Nov 2023 11:43:13 -0500 Subject: Show hunt panels option --- src/ap_state.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/ap_state.cpp') diff --git a/src/ap_state.cpp b/src/ap_state.cpp index 50601d4..5b02ba6 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp @@ -85,6 +85,13 @@ struct APState { "Achievement|" + GD_GetPanel(panel_id).achievement_name); } + for (const MapArea& map_area : GD_GetMapAreas()) { + for (const Location& location : map_area.locations) { + tracked_data_storage_keys.push_back( + "Hunt|" + std::to_string(location.ap_location_id)); + } + } + initialized = true; } @@ -311,6 +318,12 @@ struct APState { return checked_locations.count(location_id); } + bool HasCheckedHuntPanel(int location_id) { + std::string key = + data_storage_prefix + "Hunt|" + std::to_string(location_id); + return data_storage.count(key) && data_storage.at(key); + } + bool HasItem(int item_id, int quantity) { return inventory.count(item_id) && inventory.at(item_id) >= quantity; } @@ -360,6 +373,10 @@ bool AP_HasCheckedGameLocation(int location_id) { return GetState().HasCheckedGameLocation(location_id); } +bool AP_HasCheckedHuntPanel(int location_id) { + return GetState().HasCheckedHuntPanel(location_id); +} + bool AP_HasItem(int item_id, int quantity) { return GetState().HasItem(item_id, quantity); } -- cgit 1.4.1