mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-22 05:31:54 -05:00
Fix for overriding deku scrub messages
This commit is contained in:
parent
771d1dfbf5
commit
ac6843ca57
@ -790,8 +790,9 @@ void Randomizer::LoadShopMessages(const char* spoilerFileName) {
|
|||||||
ParseHintLocationsFile(spoilerFileName);
|
ParseHintLocationsFile(spoilerFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomMessageManager::Instance->ClearMessageTable(Randomizer::merchantMessageTableID);
|
// TODO: Remove these after we make sure it's fine that they aren't here
|
||||||
CustomMessageManager::Instance->AddCustomMessageTable(Randomizer::merchantMessageTableID);
|
// CustomMessageManager::Instance->ClearMessageTable(Randomizer::merchantMessageTableID);
|
||||||
|
// CustomMessageManager::Instance->AddCustomMessageTable(Randomizer::merchantMessageTableID);
|
||||||
|
|
||||||
// Make an inverse of std::unordered_map<std::string, RandomizerGet> SpoilerfileGetNameToEnum
|
// Make an inverse of std::unordered_map<std::string, RandomizerGet> SpoilerfileGetNameToEnum
|
||||||
// so that we can get the name of the item from the RandomizerCheck
|
// so that we can get the name of the item from the RandomizerCheck
|
||||||
@ -806,14 +807,15 @@ void Randomizer::LoadShopMessages(const char* spoilerFileName) {
|
|||||||
RandomizerCheck shopItemCheck = shopItemRandomizerChecks[index];
|
RandomizerCheck shopItemCheck = shopItemRandomizerChecks[index];
|
||||||
std::string shopItemName = GetEnumToSpoilerfileName[this->itemLocations[shopItemCheck]];
|
std::string shopItemName = GetEnumToSpoilerfileName[this->itemLocations[shopItemCheck]];
|
||||||
u16 shopItemPrice = randomizerMerchantPrices[shopItemCheck];
|
u16 shopItemPrice = randomizerMerchantPrices[shopItemCheck];
|
||||||
|
// TODO: Magic number 100, we don't to overwrite deku scrub messages
|
||||||
CustomMessageManager::Instance->CreateMessage(
|
CustomMessageManager::Instance->CreateMessage(
|
||||||
Randomizer::merchantMessageTableID, index, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE,
|
Randomizer::merchantMessageTableID, index + 100, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE,
|
||||||
"\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees&%wSpecial deal! ONE LEFT!&Get it while it lasts!\x0A\x02",
|
"\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees&%wSpecial deal! ONE LEFT!&Get it while it lasts!\x0A\x02",
|
||||||
"\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rubis&%wOffre spéciale! DERNIER EN STOCK!&Faites vite!\x0A\x02",
|
"\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rubis&%wOffre spéciale! DERNIER EN STOCK!&Faites vite!\x0A\x02",
|
||||||
"\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees&%wSpecial deal! ONE LEFT!&Get it while it lasts!\x0A\x02",
|
"\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees&%wSpecial deal! ONE LEFT!&Get it while it lasts!\x0A\x02",
|
||||||
});
|
});
|
||||||
CustomMessageManager::Instance->CreateMessage(
|
CustomMessageManager::Instance->CreateMessage(
|
||||||
Randomizer::merchantMessageTableID, index + shopItemRandomizerChecks.size(), { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE,
|
Randomizer::merchantMessageTableID, index + shopItemRandomizerChecks.size() + 100, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE,
|
||||||
"\x08" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees\x09&&\x1B%gBuy&Don't buy%w\x09\x02",
|
"\x08" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees\x09&&\x1B%gBuy&Don't buy%w\x09\x02",
|
||||||
"\x08" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rubis\x09&&\x1B%gAcheter&Ne pas acheter%w\x09\x02",
|
"\x08" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rubis\x09&&\x1B%gAcheter&Ne pas acheter%w\x09\x02",
|
||||||
"\x08" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees\x09&&\x1B%gBuy&Don't buy%w\x09\x02",
|
"\x08" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees\x09&&\x1B%gBuy&Don't buy%w\x09\x02",
|
||||||
|
@ -1765,7 +1765,8 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) {
|
|||||||
} else if (textId >= 0x9000 && textId <= 0x905F) {
|
} else if (textId >= 0x9000 && textId <= 0x905F) {
|
||||||
messageEntry = Randomizer_GetScrubMessage((textId & ((1 << 8) - 1)));
|
messageEntry = Randomizer_GetScrubMessage((textId & ((1 << 8) - 1)));
|
||||||
} else if (textId >= 0x9100 && textId <= 0x9180) {
|
} else if (textId >= 0x9100 && textId <= 0x9180) {
|
||||||
messageEntry = Randomizer_GetShopMessage((textId & ((1 << 8) - 1)));
|
// TODO: Magic number 100, we don't to overwrite deku scrub messages
|
||||||
|
messageEntry = Randomizer_GetShopMessage((textId & ((1 << 8) - 1)) + 100);
|
||||||
} else if (CVar_GetS32("gRandomizeRupeeNames", 0) &&
|
} else if (CVar_GetS32("gRandomizeRupeeNames", 0) &&
|
||||||
(textId == TEXT_BLUE_RUPEE || textId == TEXT_RED_RUPEE || textId == TEXT_PURPLE_RUPEE ||
|
(textId == TEXT_BLUE_RUPEE || textId == TEXT_RED_RUPEE || textId == TEXT_PURPLE_RUPEE ||
|
||||||
textId == TEXT_HUGE_RUPEE)) {
|
textId == TEXT_HUGE_RUPEE)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user