From 2df6acc9082839b44049db7ee517b1f48fa3c6b4 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Tue, 28 Feb 2023 12:23:22 -0500 Subject: [PATCH] Fix: some greg hint stuff (#2557) Co-authored-by: briaguya --- soh/soh/OTRGlobals.cpp | 4 +++- .../actors/ovl_En_Takara_Man/z_en_takara_man.c | 14 +++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index d3e8c6555..dcd862fb6 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1648,7 +1648,9 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) { } } else if (Randomizer_GetSettingValue(RSK_DAMPES_DIARY_HINT) && textId == TEXT_DAMPES_DIARY) { messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::randoMiscHintsTableID, TEXT_DAMPES_DIARY); - } else if (Randomizer_GetSettingValue(RSK_GREG_HINT) && (textId == 0x704C || textId == 0x6E)) { + } else if (play->sceneNum == SCENE_TAKARAYA && + Randomizer_GetSettingValue(RSK_GREG_HINT) && + (textId == 0x704C || textId == 0x6E || textId == 0x84)) { messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::randoMiscHintsTableID, TEXT_CHEST_GAME_PROCEED); } else if (Randomizer_GetSettingValue(RSK_SHUFFLE_WARP_SONGS) && (textId >= TEXT_WARP_MINUET_OF_FOREST && textId <= TEXT_WARP_PRELUDE_OF_LIGHT)) { diff --git a/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index 300a68a82..975bb3f14 100644 --- a/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -104,15 +104,11 @@ void func_80B1778C(EnTakaraMan* this, PlayState* play) { if (!this->unk_21A && this->unk_214) { if (Flags_GetSwitch(play, 0x32)) { - // text id 0x84 is used in places other than the treasure chest game. - // in order to provide a unique text id that can be replaced for the custom - // greg hint, we set it to 0x6E instead - if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_GREG_HINT)) { - this->actor.textId = 0x6E; - } else { - this->actor.textId = 0x84; //Thanks a lot! (Lost) - } - this->dialogState = TEXT_STATE_EVENT; + this->actor.textId = 0x84; //Thanks a lot! (Lost) + // with text state event, it is only possible to talk to the person running the game + // once. we want the player to be able to ask again if they accidentally blast through + // the greg hint box, so we check for greg hint here + this->dialogState = Randomizer_GetSettingValue(RSK_GREG_HINT) ? TEXT_STATE_DONE : TEXT_STATE_EVENT; } else { this->actor.textId = 0x704C; //Proceed this->dialogState = TEXT_STATE_DONE;