summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEblo <7004497+Eblo@users.noreply.github.com>2026-01-04 08:52:08 -0500
committerGitHub <noreply@github.com>2026-01-04 08:52:08 -0500
commitdd5c0f152a788780ef4dac22dd9c902c2d15f0be (patch)
tree122dd6ca48cd2b0e6ee198be8599595a8ff6bd2c
parentbbc2ed1abd9920597ea88865c821f7228911b5a5 (diff)
Fix softlock from repeating Kafei's Mask check (#1432)
-rw-r--r--mm/2s2h/Rando/ActorBehavior/EnAl.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/mm/2s2h/Rando/ActorBehavior/EnAl.cpp b/mm/2s2h/Rando/ActorBehavior/EnAl.cpp
index e322b9973..726b07b2f 100644
--- a/mm/2s2h/Rando/ActorBehavior/EnAl.cpp
+++ b/mm/2s2h/Rando/ActorBehavior/EnAl.cpp
@@ -15,6 +15,12 @@ void Rando::ActorBehavior::InitEnAlBehavior() {
COND_ID_HOOK(OnActorInit, ACTOR_EN_AL, IS_RANDO, [](Actor* actor) { skipCmds.clear(); });
+ // "I'm counting on you"
+ COND_ID_HOOK(OnOpenText, 0x2AA2, IS_RANDO, [](u16* textId, bool* loadFromMessageTable) {
+ Message_BombersNotebookQueueEvent(gPlayState, BOMBERS_NOTEBOOK_EVENT_MET_MADAME_AROMA);
+ Message_BombersNotebookQueueEvent(gPlayState, BOMBERS_NOTEBOOK_EVENT_RECEIVED_KAFEIS_MASK);
+ });
+
COND_VB_SHOULD(VB_EXEC_MSG_EVENT, IS_RANDO, {
u32 cmdId = va_arg(args, u32);
Actor* actor = va_arg(args, Actor*);
@@ -28,14 +34,13 @@ void Rando::ActorBehavior::InitEnAlBehavior() {
GetItemId getItemId = (GetItemId)SCRIPT_PACK_16(cmd->itemIdH, cmd->itemIdL);
skipCmds.clear();
if (getItemId == GI_MASK_KAFEIS_MASK) { // Mayor's Residence
- // Prevents the player from moving freely in case a notebook event message pops afterward
- Player_SetupWaitForPutAway(gPlayState, player, Player_SetupTalk);
+ // There is no usable flag for this check, so grant it manually
+ RANDO_SAVE_CHECKS[RC_MAYORS_OFFICE_KAFEIS_MASK].eligible = true;
} else { // Express Mail reward
/*
* We do something a little tricky here. We manually open a textbox with the message that normally
* plays after the player receives the reward (0x2B20), then also skip the MsgScript commands to
- * open that textbox and wait on it. The Player_SetupWaitForPutAway call above does not work for
- * this scenario, as it will softlock. More naive attempts at handling this actor case resulted in
+ * open that textbox and wait on it. More naive attempts at handling this actor case resulted in
* softlocks, not appropriately locking textboxes, duplicate textboxes, or Bombers' Notebook
* messages being eaten. The method below handles the intended behavior, both with or without
* notebook messages, even if it is a little counterintuitive.