diff --git a/src/d/actor/d_a_obj_smallkey.cpp b/src/d/actor/d_a_obj_smallkey.cpp index a3056211cd..23ca923f1a 100644 --- a/src/d/actor/d_a_obj_smallkey.cpp +++ b/src/d/actor/d_a_obj_smallkey.cpp @@ -13,6 +13,9 @@ #include "f_op/f_op_camera_mng.h" #include +#include "d/actor/d_a_tboxSw.h" +#include "dusk/randomizer/game/tools.h" + const static dCcD_SrcCyl l_cyl_src = { { {0x0, {{0x0, 0x0, 0x0}, {0xffffffff, 0x11}, 0x59}}, // mObj @@ -156,6 +159,14 @@ int daKey_c::create() { } m_itemNo = dItemNo_SMALL_KEY_e; +#if TARGET_PC + if (randomizer_IsActive()) { + u8 stage = getStageID(); + u8 flag = getSaveBitNo(); + u16 key = (stage << 8) | flag; + m_itemNo = randomizer_GetContext().mFreestandingItemOverrides[key]; + } +#endif if (strcmp(dComIfGp_getStartStageName(), "F_SP118") == 0 IF_DUSK(&& !randomizer_IsActive())) { OS_REPORT(" SMKEY 0\n"); diff --git a/src/dusk/randomizer/generator/data/locations.yaml b/src/dusk/randomizer/generator/data/locations.yaml index ab6814f8ea..20d222920c 100644 --- a/src/dusk/randomizer/generator/data/locations.yaml +++ b/src/dusk/randomizer/generator/data/locations.yaml @@ -4570,7 +4570,6 @@ - Tbox ID: 31 Stage: 6 -# TODO - Name: Forest Temple Big Baba Key Original Item: Forest Temple Small Key Categories: @@ -4578,8 +4577,10 @@ - Dungeon - Forest Temple - REL + - Freestanding Item Metadata: - - None + - Stage: 6 + Flag: 0x6 # Technically a tbox id - Name: Forest Temple Totem Pole Chest Original Item: Forest Temple Small Key