mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-28 08:41:47 -05:00
Use merchantMessageTableID
This commit is contained in:
parent
43d8a11de5
commit
73606edf4e
@ -32,7 +32,6 @@ u8 generated;
|
|||||||
|
|
||||||
const std::string Randomizer::getItemMessageTableID = "Randomizer";
|
const std::string Randomizer::getItemMessageTableID = "Randomizer";
|
||||||
const std::string Randomizer::hintMessageTableID = "RandomizerHints";
|
const std::string Randomizer::hintMessageTableID = "RandomizerHints";
|
||||||
const std::string Randomizer::shopMessageTableID = "RandomizerShops";
|
|
||||||
const std::string Randomizer::merchantMessageTableID = "RandomizerMerchants";
|
const std::string Randomizer::merchantMessageTableID = "RandomizerMerchants";
|
||||||
const std::string Randomizer::rupeeMessageTableID = "RandomizerRupees";
|
const std::string Randomizer::rupeeMessageTableID = "RandomizerRupees";
|
||||||
const std::string Randomizer::NaviRandoMessageTableID = "RandomizerNavi";
|
const std::string Randomizer::NaviRandoMessageTableID = "RandomizerNavi";
|
||||||
@ -741,8 +740,8 @@ void Randomizer::LoadShopMessages(const char* spoilerFileName) {
|
|||||||
ParseHintLocationsFile(spoilerFileName);
|
ParseHintLocationsFile(spoilerFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomMessageManager::Instance->ClearMessageTable(Randomizer::shopMessageTableID);
|
CustomMessageManager::Instance->ClearMessageTable(Randomizer::merchantMessageTableID);
|
||||||
CustomMessageManager::Instance->AddCustomMessageTable(Randomizer::shopMessageTableID);
|
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
|
||||||
@ -758,13 +757,13 @@ void Randomizer::LoadShopMessages(const char* spoilerFileName) {
|
|||||||
std::string shopItemName = GetEnumToSpoilerfileName[this->itemLocations[shopItemCheck]];
|
std::string shopItemName = GetEnumToSpoilerfileName[this->itemLocations[shopItemCheck]];
|
||||||
u16 shopItemPrice = randomizerMerchantPrices[shopItemCheck];
|
u16 shopItemPrice = randomizerMerchantPrices[shopItemCheck];
|
||||||
CustomMessageManager::Instance->CreateMessage(
|
CustomMessageManager::Instance->CreateMessage(
|
||||||
Randomizer::shopMessageTableID, index, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE,
|
Randomizer::merchantMessageTableID, index, { 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::shopMessageTableID, index + shopItemRandomizerChecks.size(), { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE,
|
Randomizer::merchantMessageTableID, index + shopItemRandomizerChecks.size(), { 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",
|
||||||
|
@ -36,7 +36,6 @@ class Randomizer {
|
|||||||
|
|
||||||
static const std::string getItemMessageTableID;
|
static const std::string getItemMessageTableID;
|
||||||
static const std::string hintMessageTableID;
|
static const std::string hintMessageTableID;
|
||||||
static const std::string shopMessageTableID;
|
|
||||||
static const std::string merchantMessageTableID;
|
static const std::string merchantMessageTableID;
|
||||||
static const std::string rupeeMessageTableID;
|
static const std::string rupeeMessageTableID;
|
||||||
static const std::string NaviRandoMessageTableID;
|
static const std::string NaviRandoMessageTableID;
|
||||||
|
@ -1608,7 +1608,7 @@ extern "C" CustomMessageEntry Randomizer_GetNaviMessage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" CustomMessageEntry Randomizer_GetShopMessage(s16 shopItemId) {
|
extern "C" CustomMessageEntry Randomizer_GetShopMessage(s16 shopItemId) {
|
||||||
return CustomMessageManager::Instance->RetrieveMessage(Randomizer::shopMessageTableID, shopItemId);
|
return CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, shopItemId);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" CustomMessageEntry Randomizer_GetAltarMessage() {
|
extern "C" CustomMessageEntry Randomizer_GetAltarMessage() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user