Business Scrubs: don't speak without jabber nut (#6255)

most speak checks conservatively only apply to Link initiating speech,
but didn't realize business scrubs speak unprompted & that would make deku jabber nut mostly useless

this doesn't apply to other scrubs (such as 123 scrubs), maybe in future we can block more, such as showing trade items
This commit is contained in:
Philip Dubé 2026-02-15 00:48:00 +00:00 committed by GitHub
parent 71c6f02a86
commit e6947c733c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 2 deletions

View file

@ -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

View file

@ -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 &&

View file

@ -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);
}
}

View file

@ -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"