Use VB hook to fix Deku Nut upgrade bug (#5047)

* Use VB hook to fix Deku Nut upgrade bug

* Use constexpr, remove unused extern

* Separate IS_RANDO out of value macro

* Restore mask check in hook

* Call VB hook in SkipMiscInteractions hook

* Mask of Truth hook not registered in rando
This commit is contained in:
Jordan Longstaff
2025-02-19 20:22:56 -05:00
committed by GitHub
parent 75f33a00d8
commit b6e2a995f1
6 changed files with 71 additions and 4 deletions

View File

@@ -2442,7 +2442,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if ((item >= ITEM_WEIRD_EGG) && (item <= ITEM_CLAIM_CHECK)) {
if ((item == ITEM_SAW) && CVarGetInteger(CVAR_ENHANCEMENT("DekuNutUpgradeFix"), 0) == 0) {
if (GameInteractor_Should(VB_POACHERS_SAW_SET_DEKU_NUT_UPGRADE_FLAG, item == ITEM_SAW)) {
Flags_SetItemGetInf(ITEMGETINF_OBTAINED_NUT_UPGRADE_FROM_STAGE);
}