summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA Green Spoon <121978037+A-Green-Spoon@users.noreply.github.com>2026-04-07 10:08:32 +0900
committerGitHub <noreply@github.com>2026-04-07 01:08:32 +0000
commit77f2883510965b61e563bd1432d193decf36c14a (patch)
tree4a9dd81145eaa00417970bb9989e2d5c8b583b77
parent876d512a4beb0d6bd0d3eb1181f9392ee494b86e (diff)
use category adj for gi (#6466)
-rw-r--r--soh/soh/Enhancements/randomizer/hook_handlers.cpp11
1 files 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<uint32_t>(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<int16_t>(ITEM00_SOH_GIVE_ITEM_ENTRY | 0x8000));
}
}