diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index c73c6885d..3f61e2513 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -3394,6 +3394,16 @@ void DrawRandoEditor(bool& open) { SohImGui::EnhancementCombobox("gRandomizeShuffleSongs", randoShuffleSongs, 3, 0); PaddedSeparator(); + // Shuffle Scrubs + ImGui::Text(Settings::Scrubsanity.GetName().c_str()); + InsertHelpHoverText( + "Off - Scrubs will not be shuffled.\n" + "\n" + "Affordable - Scrubs will be shuffled and their item will cost 10 rupees.\n" + ); + SohImGui::EnhancementCombobox("gRandomizeShuffleScrubs", randoShuffleScrubs, 4, 0); + PaddedSeparator(); + // Shuffle Tokens ImGui::Text(Settings::Tokensanity.GetName().c_str()); InsertHelpHoverText("Shuffles Golden Skulltula Tokens into the item pool. This means " @@ -3414,20 +3424,11 @@ void DrawRandoEditor(bool& open) { "expected to be collected after getting Sun's Song."); PaddedSeparator(); - // Shuffle Scrubs - ImGui::Text(Settings::Scrubsanity.GetName().c_str()); - InsertHelpHoverText( - "Off - Scrubs will not be shuffled.\n" - "\n" - "Affordable - Scrubs will be shuffled and their item will cost 10 rupees.\n" - ); - SohImGui::EnhancementCombobox("gRandomizeShuffleScrubs", randoShuffleScrubs, 4, 0); - PaddedSeparator(); - // Shuffle Cows - SohImGui::EnhancementCheckbox(Settings::ShuffleCows.GetName().c_str(), "gRandomizeShuffleCows"); - InsertHelpHoverText("Cows give a randomized item from the pool upon performing Epona's Song in front of them."); - PaddedSeparator(); + // Shuffle Cows + SohImGui::EnhancementCheckbox(Settings::ShuffleCows.GetName().c_str(), "gRandomizeShuffleCows"); + InsertHelpHoverText("Cows give a randomized item from the pool upon performing Epona's Song in front of them."); + PaddedSeparator(); // Shuffle Adult Trade Quest SohImGui::EnhancementCheckbox(Settings::ShuffleAdultTradeQuest.GetName().c_str(), diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h index 79d0db060..02adad1a5 100644 --- a/soh/soh/Enhancements/randomizer/randomizerTypes.h +++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h @@ -1024,4 +1024,4 @@ typedef struct ScrubIdentity { GetItemID getItemId; int32_t itemPrice; bool isShuffled; -} ScrubIdentity; \ No newline at end of file +} ScrubIdentity; diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index c5c7a33ec..4a1307d11 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1578,18 +1578,17 @@ extern "C" RandomizerCheck Randomizer_GetCheckFromActor(s16 sceneNum, s16 actorI return OTRGlobals::Instance->gRandomizer->GetCheckFromActor(sceneNum, actorId, actorParams); } -extern "C" CustomMessageEntry Randomizer_GetScrubMessage(u16 scrubTextId) { - int price = 0; - switch (scrubTextId) { - case TEXT_SCRUB_POH: - price = 10; - break; - case TEXT_SCRUB_STICK_UPGRADE: - case TEXT_SCRUB_NUT_UPGRADE: - price = 40; - break; - } - return CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, price); +extern "C" ScrubIdentity Randomizer_IdentifyScrub(s32 sceneNum, s32 actorParams, s32 respawnData) { + return OTRGlobals::Instance->gRandomizer->IdentifyScrub(sceneNum, actorParams, respawnData); +} + +extern "C" CustomMessageEntry Randomizer_GetScrubMessage(s16 itemPrice) { + return CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, itemPrice); +} + +extern "C" CustomMessageEntry Randomizer_GetNaviMessage() { + u16 naviTextId = rand() % NUM_NAVI_MESSAGES; + return CustomMessageManager::Instance->RetrieveMessage(Randomizer::NaviRandoMessageTableID, naviTextId); } extern "C" CustomMessageEntry Randomizer_GetAltarMessage() {