mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-06-10 05:03:29 -04:00
skip text: cancel in shops (#6703)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user