Gamemode service improvements. Disable achievements on custom gamemodes (for now)

This commit is contained in:
jdflyer
2026-08-18 00:33:15 -07:00
parent 85c2ddd8ff
commit c0d44d4a21
13 changed files with 99 additions and 76 deletions
+5 -1
View File
@@ -63,7 +63,11 @@ MenuBar::MenuBar()
mTabBar->add_tab("Editor", [this] { push(std::make_unique<EditorWindow>()); });
}
mTabBar->add_tab("Achievements", [this] { push(std::make_unique<AchievementsWindow>()); });
// Only allow us to access achievements if we are playing on a gamemode that uses them
if (dusk::gamemode::getGamemodeManager().isCurrentGamemode(dusk::gamemode::kVanillaGamemodeId)
|| dusk::gamemode::getGamemodeManager().isCurrentGamemode(dusk::speedrun::kSpeedrunGamemodeId)) {
mTabBar->add_tab("Achievements", [this] { push(std::make_unique<AchievementsWindow>()); });
}
mTabBar->add_tab("Mods", [this] { push(std::make_unique<ModsWindow>()); });
for (auto& tab : mods::svc::ui_mod_menu_tabs()) {
mTabBar->add_tab(tab.label, std::move(tab.onSelected));