skip text: cancel in shops (#6703)

This commit is contained in:
Philip Dubé
2026-06-10 01:24:15 +00:00
committed by GitHub
parent 29b9b4a5a7
commit de170e9746
3 changed files with 19 additions and 2 deletions
@@ -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;
@@ -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
@@ -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;