diff options
Diffstat (limited to 'src/ap_state.cpp')
| -rw-r--r-- | src/ap_state.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
| diff --git a/src/ap_state.cpp b/src/ap_state.cpp index c1147f6..a969892 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp | |||
| @@ -232,14 +232,6 @@ struct APState { | |||
| 232 | return HasItem(item_id, quantity); | 232 | return HasItem(item_id, quantity); |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | bool HasAchievement(const std::string& name) { | ||
| 236 | std::lock_guard state_guard(state_mutex); | ||
| 237 | |||
| 238 | std::string key = | ||
| 239 | fmt::format("{}Achievement|{}", data_storage_prefix, name); | ||
| 240 | return data_storage.count(key) && std::any_cast<bool>(data_storage.at(key)); | ||
| 241 | } | ||
| 242 | |||
| 243 | const std::set<std::string>& GetCheckedPaintings() { | 235 | const std::set<std::string>& GetCheckedPaintings() { |
| 244 | std::lock_guard state_guard(state_mutex); | 236 | std::lock_guard state_guard(state_mutex); |
| 245 | 237 | ||
| @@ -298,11 +290,6 @@ struct APState { | |||
| 298 | 290 | ||
| 299 | std::thread([this]() { Thread(); }).detach(); | 291 | std::thread([this]() { Thread(); }).detach(); |
| 300 | 292 | ||
| 301 | for (int panel_id : GD_GetAchievementPanels()) { | ||
| 302 | tracked_data_storage_keys.push_back(fmt::format( | ||
| 303 | "Achievement|{}", GD_GetPanel(panel_id).achievement_name)); | ||
| 304 | } | ||
| 305 | |||
| 306 | for (int i = 0; i < PANEL_BITFIELDS; i++) { | 293 | for (int i = 0; i < PANEL_BITFIELDS; i++) { |
| 307 | tracked_data_storage_keys.push_back(fmt::format("Panels_{}", i)); | 294 | tracked_data_storage_keys.push_back(fmt::format("Panels_{}", i)); |
| 308 | } | 295 | } |
| @@ -608,9 +595,6 @@ struct APState { | |||
| 608 | TrackerLog(fmt::format("Data storage {} retrieved as {}", key, | 595 | TrackerLog(fmt::format("Data storage {} retrieved as {}", key, |
| 609 | (value.get<bool>() ? "true" : "false"))); | 596 | (value.get<bool>() ? "true" : "false"))); |
| 610 | 597 | ||
| 611 | if (key.find("Achievement|") != std::string::npos) { | ||
| 612 | state_update.achievements = true; | ||
| 613 | } | ||
| 614 | } else if (value.is_number()) { | 598 | } else if (value.is_number()) { |
| 615 | data_storage[key] = value.get<int>(); | 599 | data_storage[key] = value.get<int>(); |
| 616 | TrackerLog(fmt::format("Data storage {} retrieved as {}", key, | 600 | TrackerLog(fmt::format("Data storage {} retrieved as {}", key, |
| @@ -844,10 +828,6 @@ VictoryCondition AP_GetVictoryCondition() { | |||
| 844 | return GetState().victory_condition; | 828 | return GetState().victory_condition; |
| 845 | } | 829 | } |
| 846 | 830 | ||
| 847 | bool AP_HasAchievement(const std::string& achievement_name) { | ||
| 848 | return GetState().HasAchievement(achievement_name); | ||
| 849 | } | ||
| 850 | |||
| 851 | bool AP_HasEarlyColorHallways() { | 831 | bool AP_HasEarlyColorHallways() { |
| 852 | std::lock_guard state_guard(GetState().state_mutex); | 832 | std::lock_guard state_guard(GetState().state_mutex); |
| 853 | 833 | ||
