From b099b5649beb13ec9cce1ce4f9e2de94c518e964 Mon Sep 17 00:00:00 2001 From: Patrick12115 <115201185+Patrick12115@users.noreply.github.com> Date: Sun, 2 Apr 2023 04:19:58 -0400 Subject: [PATCH] [Time Saver Enhancement] Dampe Appears All Night (#2618) * Dampe Appears All Night * Take out time check --- soh/soh/Enhancements/presets.h | 1 + soh/soh/GameMenuBar.cpp | 2 ++ soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c | 8 ++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index da89029a0..cf617021e 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -129,6 +129,7 @@ const std::vector enhancementsCvars = { "gTimeFlowFileSelect", "gInjectItemCounts", "gDayGravePull", + "gDampeAllNight", "gSkipScarecrow", "gBlueFireArrows", "gSunlightArrows", diff --git a/soh/soh/GameMenuBar.cpp b/soh/soh/GameMenuBar.cpp index a421d4667..9b0420604 100644 --- a/soh/soh/GameMenuBar.cpp +++ b/soh/soh/GameMenuBar.cpp @@ -354,6 +354,8 @@ namespace GameMenuBar { "to the guard next to the gate."); UIWidgets::PaddedEnhancementCheckbox("Faster Farore's Wind", "gFastFarores", true, false); UIWidgets::Tooltip("Greatly decreases cast time of Farore's Wind magic spell."); + UIWidgets::PaddedEnhancementCheckbox("Dampe Appears All Night", "gDampeAllNight", true, false); + UIWidgets::Tooltip("Makes Dampe appear anytime during it's night, not just his usual working hours."); ImGui::EndMenu(); } diff --git a/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c index 625f41983..60c78d04f 100644 --- a/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -502,8 +502,12 @@ void EnTk_Init(Actor* thisx, PlayState* play) { CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit); - if (gSaveContext.dayTime <= 0xC000 || gSaveContext.dayTime >= 0xE000 || !!LINK_IS_ADULT || - play->sceneNum != SCENE_SPOT02) { + if (CVarGetInteger("gDampeAllNight", 0)) { + if (!!LINK_IS_ADULT || play->sceneNum != SCENE_SPOT02) { + Actor_Kill(&this->actor); + return; + } + } else if (gSaveContext.dayTime <= 0xC000 || gSaveContext.dayTime >= 0xE000 || !!LINK_IS_ADULT || play->sceneNum != SCENE_SPOT02) { Actor_Kill(&this->actor); return; }