Add CVar + Cvar check

Defaults to "1"
This commit is contained in:
Sarge-117 2022-08-23 17:16:19 -07:00
parent 44e510e867
commit 45873ba71d
2 changed files with 7 additions and 1 deletions

View File

@ -452,6 +452,7 @@ namespace SohImGui {
io->ConfigFlags |= ImGuiConfigFlags_DockingEnable; io->ConfigFlags |= ImGuiConfigFlags_DockingEnable;
io->Fonts->AddFontDefault(); io->Fonts->AddFontDefault();
statsWindowOpen = CVar_GetS32("gStatsEnabled", 0); statsWindowOpen = CVar_GetS32("gStatsEnabled", 0);
CVar_RegisterS32("gRandoRelevantNavi", 1);
#ifdef __SWITCH__ #ifdef __SWITCH__
Ship::Switch::SetupFont(io->Fonts); Ship::Switch::SetupFont(io->Fonts);
#endif #endif
@ -1912,6 +1913,11 @@ namespace SohImGui {
"(medallions/stones/songs). Note that these fanfares\n" "(medallions/stones/songs). Note that these fanfares\n"
"are longer than usual." "are longer than usual."
); );
EnhancementCheckbox("Rando-Relevant Navi Hints", "gRandoRelevantNavi");
Tooltip(
"Replace Navi's overworld quest hints with rando-\n"
"related gameplay hints.\n"
);
ImGui::EndMenu(); ImGui::EndMenu();
} }

View File

@ -1546,7 +1546,7 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) {
} else if (textId == TEXT_SCRUB_POH || textId == TEXT_SCRUB_STICK_UPGRADE || textId == TEXT_SCRUB_NUT_UPGRADE) { } else if (textId == TEXT_SCRUB_POH || textId == TEXT_SCRUB_STICK_UPGRADE || textId == TEXT_SCRUB_NUT_UPGRADE) {
messageEntry = Randomizer_GetScrubMessage(textId); messageEntry = Randomizer_GetScrubMessage(textId);
// In rando, replace Navi's general overworld hints with rando-related gameplay tips // In rando, replace Navi's general overworld hints with rando-related gameplay tips
} else if (textId >= 0x0140 && textId <= 0x015F) { } else if (CVar_GetS32("gRandoRelevantNavi", 1) && textId >= 0x0140 && textId <= 0x015F) {
messageEntry = Randomizer_GetNaviMessage(); messageEntry = Randomizer_GetNaviMessage();
} }
} }