From ed85a1b0e227149ac2dd1b6ca557f4d1a40dab72 Mon Sep 17 00:00:00 2001 From: Patrick12115 <115201185+Patrick12115@users.noreply.github.com> Date: Thu, 1 Feb 2024 21:12:28 -0500 Subject: [PATCH] [Time Saver] Reset Navi Timer (#3818) * Reset Navi Timer * Force Rebuild * Prefix --- soh/soh/Enhancements/mods.cpp | 9 +++++++++ soh/soh/SohMenuBar.cpp | 2 ++ 2 files changed, 11 insertions(+) diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index bbb5d5998..c1561aa42 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -687,6 +687,14 @@ void RegisterMirrorModeHandler() { }); } +void RegisterResetNaviTimer() { + GameInteractor::Instance->RegisterGameHook([](int32_t sceneNum) { + if (CVarGetInteger("gEnhancements.ResetNaviTimer", 0)) { + gSaveContext.naviTimer = 0; + } + }); +} + f32 triforcePieceScale; void RegisterTriforceHunt() { @@ -1271,6 +1279,7 @@ void InitMods() { RegisterBonkDamage(); RegisterMenuPathFix(); RegisterMirrorModeHandler(); + RegisterResetNaviTimer(); RegisterTriforceHunt(); RegisterGrantGanonsBossKey(); RegisterEnemyDefeatCounts(); diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index 9f3604219..c0aae7a5e 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -574,6 +574,8 @@ void DrawEnhancementsMenu() { "This doesn't work if the save was made in a grotto."); UIWidgets::PaddedEnhancementCheckbox("No Forced Navi", "gNoForcedNavi", true, false); UIWidgets::Tooltip("Prevent forced Navi conversations"); + UIWidgets::PaddedEnhancementCheckbox("Navi Timer Resets", "gEnhancements.ResetNaviTimer", true, false); + UIWidgets::Tooltip("Resets the Navi timer on scene change. If you have already talked to her, she will try and talk to you again, instead of needing a save warp or death. "); UIWidgets::PaddedEnhancementCheckbox("No Skulltula Freeze", "gSkulltulaFreeze", true, false); UIWidgets::Tooltip("Stops the game from freezing the player when picking up Gold Skulltulas"); UIWidgets::PaddedEnhancementCheckbox("Nighttime GS Always Spawn", "gNightGSAlwaysSpawn", true, false);