mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-04-23 08:14:31 +00:00
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:
parent
71c6f02a86
commit
e6947c733c
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 &&
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue