From 77f2883510965b61e563bd1432d193decf36c14a Mon Sep 17 00:00:00 2001 From: A Green Spoon <121978037+A-Green-Spoon@users.noreply.github.com> Date: Tue, 7 Apr 2026 10:08:32 +0900 Subject: [PATCH] use category adj for gi (#6466) --- soh/soh/Enhancements/randomizer/hook_handlers.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index 04f9fc80e..ee2aecd55 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -13,6 +13,7 @@ #include "soh/SaveManager.h" #include "soh/ShipInit.hpp" #include "soh/ObjectExtension/ObjectExtension.h" +#include "item_category_adj.h" extern "C" { #include "macros.h" @@ -370,6 +371,7 @@ void RandomizerOnPlayerUpdateForRCQueueHandler() { GetItemID vanillaItem = (GetItemID)Rando::StaticData::RetrieveItem(vanillaRandomizerGet).GetItemID(); GetItemEntry getItemEntry = Rando::Context::GetInstance()->GetFinalGIEntry(rc, true, (GetItemID)vanillaRandomizerGet); + GetItemCategory getItemCategory = Randomizer_AdjustItemCategory(getItemEntry); if (loc->HasObtained()) { SPDLOG_INFO("RC {} already obtained, skipping", static_cast(rc)); @@ -393,13 +395,8 @@ void RandomizerOnPlayerUpdateForRCQueueHandler() { // crude fix to ensure map hints are readable. Ideally replace with better hint tracking. !(getItemEntry.getItemId >= RG_DEKU_TREE_MAP && getItemEntry.getItemId <= RG_ICE_CAVERN_MAP && getItemEntry.modIndex == MOD_RANDOMIZER) && - (getItemEntry.getItemCategory == ITEM_CATEGORY_JUNK || - getItemEntry.getItemCategory == ITEM_CATEGORY_SKULLTULA_TOKEN || - getItemEntry.getItemCategory == ITEM_CATEGORY_HEALTH || - getItemEntry.getItemCategory == ITEM_CATEGORY_LESSER || - // Treat small keys as junk if Skeleton Key is obtained. - (getItemEntry.getItemCategory == ITEM_CATEGORY_SMALL_KEY && - Flags_GetRandomizerInf(RAND_INF_HAS_SKELETON_KEY))))))) { + (getItemCategory == ITEM_CATEGORY_JUNK || getItemCategory == ITEM_CATEGORY_SKULLTULA_TOKEN || + getItemCategory == ITEM_CATEGORY_HEALTH || getItemCategory == ITEM_CATEGORY_LESSER))))) { Item_DropCollectible(gPlayState, &spawnPos, static_cast(ITEM00_SOH_GIVE_ITEM_ENTRY | 0x8000)); } }