diff --git a/soh/soh/Enhancements/TimeSavers/timesaver_hook_handlers.cpp b/soh/soh/Enhancements/TimeSavers/timesaver_hook_handlers.cpp index 34e1716975..7816cdf4de 100644 --- a/soh/soh/Enhancements/TimeSavers/timesaver_hook_handlers.cpp +++ b/soh/soh/Enhancements/TimeSavers/timesaver_hook_handlers.cpp @@ -874,6 +874,15 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li } break; } + case VB_SHOULD_OSSAN_CANCEL: { + // In shop B means cancel, prevent advancing as if mashing A + if (CVarGetInteger(CVAR_ENHANCEMENT("SkipText"), 0)) { + Input* input = va_arg(args, Input*); + if (!*should) + *should = CHECK_BTN_ALL(input->cur.button, BTN_B); + } + break; + } case VB_PLAY_SLOW_CHEST_CS: { if (CVarGetInteger(CVAR_ENHANCEMENT("FastChests"), 0)) { *should = false; diff --git a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h index 64b47de7d1..16389f8ad5 100644 --- a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h +++ b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h @@ -2199,6 +2199,14 @@ typedef enum { // - `*VBFishingData` VB_SHOULD_GIVE_VANILLA_FISHING_PRIZE, + // #### `result` + // ```c + // CHECK_BTN_ALL(input->press.button, BTN_B) + // ``` + // #### `args` + // - `*Input` + VB_SHOULD_OSSAN_CANCEL, + // #### `result` // ```c // true diff --git a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index f6077d2d0e..1d3a9a4fd2 100644 --- a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -692,7 +692,7 @@ void EnOssan_EndInteraction(PlayState* play, EnOssan* this) { } s32 EnOssan_TestEndInteraction(EnOssan* this, PlayState* play, Input* input) { - if (CHECK_BTN_ALL(input->press.button, BTN_B)) { + if (GameInteractor_Should(VB_SHOULD_OSSAN_CANCEL, CHECK_BTN_ALL(input->press.button, BTN_B), input)) { EnOssan_EndInteraction(play, this); return true; } else { @@ -701,7 +701,7 @@ s32 EnOssan_TestEndInteraction(EnOssan* this, PlayState* play, Input* input) { } s32 EnOssan_TestCancelOption(EnOssan* this, PlayState* play, Input* input) { - if (CHECK_BTN_ALL(input->press.button, BTN_B)) { + if (GameInteractor_Should(VB_SHOULD_OSSAN_CANCEL, CHECK_BTN_ALL(input->press.button, BTN_B), input)) { this->stateFlag = this->tempStateFlag; Message_ContinueTextbox(play, this->shelfSlots[this->cursorIndex]->actor.textId); return true;