diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp index b58eabe55..2e0280b4f 100644 --- a/soh/soh/Enhancements/randomizer/randomizer.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer.cpp @@ -4629,23 +4629,23 @@ void CreateRupeeMessages() { for (u8 rupee : rupees) { switch (rupee) { case TEXT_BLUE_RUPEE: - rupeeText = "\x05\x03 5 BitCoin\x05\x00 "; + rupeeText = "\x05\x03 5 %RUPEE%\x05\x00"; break; case TEXT_RED_RUPEE: - rupeeText = "\x05\x01 20 Moneys\x05\x00 "; + rupeeText = "\x05\x01 20 %RUPEE%\x05\x00"; break; case TEXT_PURPLE_RUPEE: - rupeeText = "\x05\x05 50 Gummybears\x05\x00 "; + rupeeText = "\x05\x05 50 %RUPEE%\x05\x00"; break; case TEXT_HUGE_RUPEE: - rupeeText = "\x05\x06 200 Cornflakes\x05\x00 "; + rupeeText = "\x05\x06 200 %RUPEE%\x05\x00"; break; } customMessageManager->CreateMessage(Randomizer::rupeeMessageTableID, rupee, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM, - "You found" + rupeeText + "!", - "You found" + rupeeText + "!", - "You found" + rupeeText + "!" + "You found" + rupeeText + " !", + "Du fandest" + rupeeText + " !", + "Tu as trouvé" + rupeeText + " !" }); } } diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 663f7ada0..92db032d1 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1447,8 +1447,32 @@ extern "C" CustomMessageEntry Randomizer_GetScrubMessage(u16 scrubTextId) { return CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, price); } +extern "C" std::string Randomizer_InsertRupeeName(std::string message, int language) { + std::string replaceWith; + switch (language) { + case LANGUAGE_ENG: + replaceWith = "Bananas"; + break; + case LANGUAGE_GER: + replaceWith = "Sauerkraut"; + break; + case LANGUAGE_FRA: + replaceWith = "Baguettes"; + break; + } + std::string replaceString = "%RUPEE%"; + size_t pos = message.find(replaceString); + size_t len = replaceString.length(); + message.replace(pos, len, replaceWith); + return message; +} + extern "C" CustomMessageEntry Randomizer_GetRupeeMessage(u16 rupeeTextId) { - return CustomMessageManager::Instance->RetrieveMessage(Randomizer::rupeeMessageTableID, rupeeTextId); + CustomMessageEntry messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::rupeeMessageTableID, rupeeTextId); + messageEntry.english = Randomizer_InsertRupeeName(messageEntry.english, LANGUAGE_ENG); + messageEntry.german = Randomizer_InsertRupeeName(messageEntry.german, LANGUAGE_GER); + messageEntry.french = Randomizer_InsertRupeeName(messageEntry.french, LANGUAGE_FRA); + return messageEntry; } extern "C" CustomMessageEntry Randomizer_GetAltarMessage() { @@ -1576,7 +1600,6 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) { case LANGUAGE_GER: return msgCtx->msgLength = font->msgLength = CopyStringToCharBuffer(messageEntry.german, buffer, maxBufferSize); - case LANGUAGE_ENG: default: return msgCtx->msgLength = font->msgLength =