diff --git a/soh/soh/Enhancements/presets.h b/soh/soh/Enhancements/presets.h index 025581b0d..3fede1e9b 100644 --- a/soh/soh/Enhancements/presets.h +++ b/soh/soh/Enhancements/presets.h @@ -269,6 +269,7 @@ const std::vector enhancementsCvars = { "gEnhancements.OpenAllHours", "gEnhancements.ResetNaviTimer", "gEnhancements.ScaleAdultEquimentAsChild", + "gEnhancements.LeeverSpawnRate", "gEnhancements.SwordToggle", "gEnhancements.FixFloorSwitches", "gFixZoraHintDialogue", diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index a3f91b145..3ba5030f3 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -977,6 +977,8 @@ void DrawEnhancementsMenu() { UIWidgets::Tooltip("All dogs can be traded in and will count as Richard."); UIWidgets::PaddedEnhancementSliderInt("Cuccos Stay Put Multiplier: %dx", "##CuccoStayDurationMultiplier", "gCuccoStayDurationMultiplier", 1, 5, "", 1, true, true, false); UIWidgets::Tooltip("Cuccos will stay in place longer after putting them down, by a multiple of the value of the slider."); + UIWidgets::PaddedEnhancementSliderInt("Leever Spawn Rate: %d seconds", "##LeeverSpawnRate", "gEnhancements.LeeverSpawnRate", 0, 10, "", 0, true, true, false); + UIWidgets::Tooltip("The time between leever groups spawning."); ImGui::EndMenu(); } diff --git a/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index a43dd8679..146f0deaa 100644 --- a/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/soh/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -169,6 +169,10 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, PlayState* play) { break; } } + int32_t modifiedSpawnRate = CVarGetInteger("gEnhancements.LeeverSpawnRate", 0); + if (modifiedSpawnRate) { + this->timer = 20 * modifiedSpawnRate; + } } } }