Skip Goron Link's forced dialogue (#4688)

* Skip Goron Link's forced dialogue

* Rename VB flag
This commit is contained in:
Jordan Longstaff 2024-12-16 00:15:31 -05:00 committed by GitHub
parent add5347126
commit 2a3bdca8a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 2 deletions

View File

@ -127,6 +127,7 @@ typedef enum {
*/
VB_BE_ELIGIBLE_FOR_NOCTURNE_OF_SHADOW,
// Opt: *EnGo2
VB_GORON_LINK_BE_SCARED,
// Vanilla condition: CUR_CAPACITY(UPG_BOMB_BAG) >= 20 && this->waypoint > 7 && this->waypoint < 12
VB_BE_ELIGIBLE_FOR_CHILD_ROLLING_GORON_REWARD,
// Vanilla condition: !CHECK_OWNED_EQUIP_ALT(EQUIP_TYPE_SWORD, EQUIP_INV_SWORD_BIGGORON)

View File

@ -39,6 +39,8 @@ extern int32_t D_8011D3AC;
extern void BgSpot03Taki_HandleWaterfallState(BgSpot03Taki* bgSpot03Taki, PlayState* play);
extern void BgSpot03Taki_ApplyOpeningAlpha(BgSpot03Taki* bgSpot03Taki, s32 bufferIndex);
extern void EnGo2_CurledUp(EnGo2* enGo2, PlayState* play);
extern void EnRu2_SetEncounterSwitchFlag(EnRu2* enRu2, PlayState* play);
}
@ -359,6 +361,18 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
}
break;
}
case VB_GORON_LINK_BE_SCARED: {
if (ForcedDialogIsDisabled(FORCED_DIALOG_SKIP_NPC)) {
EnGo2* goronLink = va_arg(args, EnGo2*);
goronLink->trackingMode = NPC_TRACKING_NONE;
goronLink->unk_211 = false;
goronLink->isAwake = false;
goronLink->actionFunc = EnGo2_CurledUp;
Flags_SetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING);
*should = false;
}
break;
}
case VB_NOT_BE_GREETED_BY_SARIA:
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.Entrances"), IS_RANDO) && !Flags_GetInfTable(INFTABLE_GREETED_BY_SARIA)) {
Flags_SetInfTable(INFTABLE_GREETED_BY_SARIA);

View File

@ -1768,8 +1768,10 @@ void EnGo2_GroundRolling(EnGo2* this, PlayState* play) {
if (this->unk_59C == 0) {
switch (this->actor.params & 0x1F) {
case GORON_CITY_LINK:
if (GameInteractor_Should(VB_GORON_LINK_BE_SCARED, true, this)) {
this->goronState = 0;
this->actionFunc = EnGo2_GoronLinkStopRolling;
}
break;
case GORON_CITY_ROLLING_BIG:
EnGo2_WakeUp(this, play);