Fix: Goron City Doors after Fire Temple (#5950)

fixes not being able to open doors when fire temple defeated before talking to Link the Goron

does not apply to rando
This commit is contained in:
Ralphie Morell
2026-01-10 09:53:07 -05:00
committed by GitHub
parent 989bbe0dd0
commit 65227f65f2
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include "soh/ShipInit.hpp"
extern "C" {
#include "functions.h"
#include "macros.h"
#include "variables.h"
#include "z64save.h"
}
static constexpr int32_t CVAR_GC_DOOR_FIX_DEFAULT = 0;
#define CVAR_GC_DOOR_FIX_NAME CVAR_ENHANCEMENT("GCDoorsAfterFireFix")
#define CVAR_GC_DOOR_FIX_VALUE CVarGetInteger(CVAR_GC_DOOR_FIX_NAME, CVAR_GC_DOOR_FIX_DEFAULT)
static void OnInitGCDoor(void* refActor) {
// In the off chance that Fire Temple is completed before stopping Goron Link and getting
// Goron Tunic / opening the city doors, open them the next time Link goes to Goron City.
if (GameInteractor_Should(VB_GORONS_CONSIDER_FIRE_TEMPLE_FINISHED, CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) &&
!Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
Flags_SetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED);
}
}
void RegisterGoronTunicFix() {
COND_ID_HOOK(OnActorInit, ACTOR_BG_SPOT18_SHUTTER, !IS_RANDO && CVAR_GC_DOOR_FIX_VALUE, OnInitGCDoor);
}
static RegisterShipInitFunc initFunc(RegisterGoronTunicFix, { CVAR_GC_DOOR_FIX_NAME, "IS_RANDO" });

View File

@@ -1006,6 +1006,11 @@ void SohMenu::AddMenuEnhancements() {
.CVar(CVAR_ENHANCEMENT("AnubisFix"))
.Options(CheckboxOptions().Tooltip(
"Make Anubis Fireballs do Fire damage when reflected back at them with the Mirror Shield."));
AddWidget(path, "Fix Goron City Doors After Fire Temple", WIDGET_CVAR_CHECKBOX)
.CVar(CVAR_ENHANCEMENT("GCDoorsAfterFireFix"))
.Options(CheckboxOptions().Tooltip(
"Forces Goron City doors open if you somehow complete Fire Temple without talking to Goron Link "
" and receiving the Goron Tunic."));
AddWidget(path, "Item-related Fixes", WIDGET_SEPARATOR_TEXT);
AddWidget(path, "Fix Deku Nut Upgrade", WIDGET_CVAR_CHECKBOX)