Fix adult trade items spoiling during file load in rando (#6358)
This commit is contained in:
@@ -1725,12 +1725,6 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_REVERT_SPOILING_ITEMS: {
|
|
||||||
if (RAND_GET_OPTION(RSK_SHUFFLE_ADULT_TRADE)) {
|
|
||||||
*should = false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case VB_BE_ABLE_TO_PLAY_BOMBCHU_BOWLING: {
|
case VB_BE_ABLE_TO_PLAY_BOMBCHU_BOWLING: {
|
||||||
// Only check for bomb bag when bombchus aren't in logic
|
// Only check for bomb bag when bombchus aren't in logic
|
||||||
// and only check for bombchus when bombchus are in logic
|
// and only check for bombchus when bombchus are in logic
|
||||||
@@ -2679,6 +2673,13 @@ static void RandomizerRegisterHooks() {
|
|||||||
static uint32_t onKaleidoUpdateHook = 0;
|
static uint32_t onKaleidoUpdateHook = 0;
|
||||||
static uint32_t onCuccoOrChickenHatchHook = 0;
|
static uint32_t onCuccoOrChickenHatchHook = 0;
|
||||||
|
|
||||||
|
// register this outside OnLoadGame as VB is invoked before OnLoadGame
|
||||||
|
COND_VB_SHOULD(VB_REVERT_SPOILING_ITEMS, true, {
|
||||||
|
if (IS_RANDO && RAND_GET_OPTION(RSK_SHUFFLE_ADULT_TRADE)) {
|
||||||
|
*should = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnLoadGame>([](int32_t fileNum) {
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnLoadGame>([](int32_t fileNum) {
|
||||||
ShipInit::Init("IS_RANDO");
|
ShipInit::Init("IS_RANDO");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user