1
0
mirror of synced 2025-01-18 00:56:49 +01:00

fix: Don't treat unlocked achievements as invisible anymore

This commit is contained in:
WerWolv 2023-11-16 13:24:09 +01:00
parent 1331b0691f
commit 1136556a0d

View File

@ -21,6 +21,15 @@ namespace hex::plugin::builtin {
this->m_achievementUnlockQueue.push_back(&achievement);
});
EventManager::subscribe<RequestOpenWindow>(this, [this](const std::string &name) {
if (name == "Achievements") {
TaskManager::doLater([this] {
this->m_viewOpen = true;
this->getWindowOpenState() = true;
});
}
});
// Load settings
this->m_showPopup = ContentRegistry::Settings::read("hex.builtin.setting.interface", "hex.builtin.setting.interface.achievement_popup", true);
}
@ -164,7 +173,7 @@ namespace hex::plugin::builtin {
// Calculate number of invisible achievements
const auto invisibleCount = std::count_if(achievements.begin(), achievements.end(), [](const auto &entry) {
const auto &[name, achievement] = entry;
return achievement->isInvisible();
return achievement->isInvisible() && !achievement->isUnlocked();
});
// Calculate number of visible achievements