mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-04-23 08:14:31 +00:00
Fix adult trade items spoiling during file load in rando (#6358)
This commit is contained in:
parent
45449623bb
commit
b15ac97dea
|
|
@ -1725,12 +1725,6 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
|
|||
}
|
||||
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: {
|
||||
// Only check for bomb bag when bombchus aren't 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 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) {
|
||||
ShipInit::Init("IS_RANDO");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue