diff --git a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h index 0cf3fe92b..9659c69d8 100644 --- a/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h +++ b/soh/soh/Enhancements/game-interactor/vanilla-behavior/GIVanillaBehavior.h @@ -262,6 +262,14 @@ typedef enum { // - `*EnShopnuts` VB_BUSINESS_SCRUB_DESPAWN, + // #### `result` + // ```c + // this->actor.xzDistToPlayer < 130.0f + // ``` + // #### `args` + // - None + VB_BUSINESS_SCRUB_SPEAK, + // #### `result` // ```c // true diff --git a/soh/soh/Enhancements/randomizer/ShuffleSpeak.cpp b/soh/soh/Enhancements/randomizer/ShuffleSpeak.cpp index ab299a5c2..b775bd0eb 100644 --- a/soh/soh/Enhancements/randomizer/ShuffleSpeak.cpp +++ b/soh/soh/Enhancements/randomizer/ShuffleSpeak.cpp @@ -9,6 +9,12 @@ extern PlayState* gPlayState; void RegisterShuffleSpeak() { bool shouldRegister = IS_RANDO && Rando::Context::GetInstance()->GetOption(RSK_SHUFFLE_SPEAK).Get(); + COND_VB_SHOULD(VB_BUSINESS_SCRUB_SPEAK, shouldRegister, { + if (!Flags_GetRandomizerInf(RAND_INF_CAN_SPEAK_DEKU)) { + *should = false; + } + }); + COND_VB_SHOULD(VB_SPEAK, shouldRegister, { Actor* talkActor = GET_PLAYER(gPlayState)->talkActor; if (talkActor != NULL && talkActor->category == ACTORCAT_NPC && diff --git a/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c index 4ba3520b1..89044687e 100644 --- a/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -321,7 +321,7 @@ void EnDns_Idle(EnDns* this, PlayState* play) { } else { this->actor.flags &= ~ACTOR_FLAG_TALK_OFFER_AUTO_ACCEPTED; } - if (this->actor.xzDistToPlayer < 130.0f) { + if (GameInteractor_Should(VB_BUSINESS_SCRUB_SPEAK, this->actor.xzDistToPlayer < 130.0f)) { func_8002F2F4(&this->actor, play); } } diff --git a/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c b/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c index 5ac3c7e8d..a40cc2736 100644 --- a/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c +++ b/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c @@ -1,7 +1,6 @@ #include "z_en_shopnuts.h" #include "objects/object_shopnuts/object_shopnuts.h" #include "overlays/actors/ovl_En_Dns/z_en_dns.h" -#include "soh/OTRGlobals.h" #include "soh/ResourceManagerHelpers.h" #include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"