Rando: Shuffle consumable bags (#3959)

* Main implementation

* Fix sticks & nuts from shops & checks

* Change the models to normal stick & nut

Worth noting that before you have the bags, the refills are blue rupees so there will not be model collision

* Update hook_handlers.cpp
This commit is contained in:
Pepe20129
2024-07-17 18:42:56 +02:00
committed by GitHub
parent f2958aea1c
commit a5c0cede12
13 changed files with 127 additions and 17 deletions
@@ -487,6 +487,10 @@ s32 EnGirlA_CanBuy_Bombs(PlayState* play, EnGirlA* this) {
}
s32 EnGirlA_CanBuy_DekuNuts(PlayState* play, EnGirlA* this) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_DEKU_NUT_BAG) && CUR_CAPACITY(UPG_NUTS) == 0) {
return CANBUY_RESULT_CANT_GET_NOW;
}
if ((CUR_CAPACITY(UPG_NUTS) != 0) && (AMMO(ITEM_NUT) >= CUR_CAPACITY(UPG_NUTS))) {
return CANBUY_RESULT_CANT_GET_NOW;
}
@@ -500,6 +504,10 @@ s32 EnGirlA_CanBuy_DekuNuts(PlayState* play, EnGirlA* this) {
}
s32 EnGirlA_CanBuy_DekuSticks(PlayState* play, EnGirlA* this) {
if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_DEKU_STICK_BAG) && CUR_CAPACITY(UPG_STICKS) == 0) {
return CANBUY_RESULT_CANT_GET_NOW;
}
if ((CUR_CAPACITY(UPG_STICKS) != 0) && (AMMO(ITEM_STICK) >= CUR_CAPACITY(UPG_STICKS))) {
return CANBUY_RESULT_CANT_GET_NOW;
}