mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-24 09:08:52 -05:00
Merge rando-next and rename scrub message table to merchant message table
This commit is contained in:
parent
e9fa231ae6
commit
71e7fb9d70
@ -32,7 +32,7 @@ u8 generated;
|
||||
|
||||
const std::string Randomizer::getItemMessageTableID = "Randomizer";
|
||||
const std::string Randomizer::hintMessageTableID = "RandomizerHints";
|
||||
const std::string Randomizer::scrubMessageTableID = "RandomizerScrubs";
|
||||
const std::string Randomizer::merchantMessageTableID = "RandomizerScrubs";
|
||||
const std::string Randomizer::rupeeMessageTableID = "RandomizerRupees";
|
||||
const std::string Randomizer::NaviRandoMessageTableID = "RandomizerNavi";
|
||||
|
||||
@ -4030,10 +4030,10 @@ void CreateGetItemMessages(std::vector<GetItemMessage> messageEntries) {
|
||||
|
||||
// Currently these are generated at runtime, one for each price between 0-95. We're soon going to migrate this
|
||||
// to being generated at save load, with only messages specific to each scrub.
|
||||
void CreateScrubMessages() {
|
||||
void CreateMerchantMessages() {
|
||||
CustomMessageManager* customMessageManager = CustomMessageManager::Instance;
|
||||
customMessageManager->AddCustomMessageTable(Randomizer::scrubMessageTableID);
|
||||
customMessageManager->CreateMessage(Randomizer::scrubMessageTableID, 0,
|
||||
customMessageManager->AddCustomMessageTable(Randomizer::merchantMessageTableID);
|
||||
customMessageManager->CreateMessage(Randomizer::merchantMessageTableID, 0,
|
||||
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
|
||||
"\x12\x38\x82\All right! You win! In return for&sparing me, I will give you a&%gmysterious item%w!&Please, take it!\x07\x10\xA3",
|
||||
"\x12\x38\x82\In Ordnung! Du gewinnst! Im Austausch&dafür, dass du mich verschont hast,&werde ich dir einen %gmysteriösen&Gegenstand%w geben! Bitte nimm ihn!\x07\x10\xA3",
|
||||
@ -4041,7 +4041,7 @@ void CreateScrubMessages() {
|
||||
});
|
||||
|
||||
for (u32 price = 5; price <= 95; price += 5) {
|
||||
customMessageManager->CreateMessage(Randomizer::scrubMessageTableID, price,
|
||||
customMessageManager->CreateMessage(Randomizer::merchantMessageTableID, price,
|
||||
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
|
||||
"\x12\x38\x82\All right! You win! In return for&sparing me, I will sell you a&%gmysterious item%w!&%r" +
|
||||
std::to_string(price) + " Rupees%w it is!\x07\x10\xA3",
|
||||
@ -4053,7 +4053,7 @@ void CreateScrubMessages() {
|
||||
});
|
||||
}
|
||||
customMessageManager->CreateMessage(
|
||||
Randomizer::scrubMessageTableID, TEXT_BEAN_SALESMAN,
|
||||
Randomizer::merchantMessageTableID, TEXT_BEAN_SALESMAN,
|
||||
{
|
||||
TEXTBOX_TYPE_BLACK,
|
||||
TEXTBOX_POS_BOTTOM,
|
||||
@ -4323,7 +4323,7 @@ void Randomizer::CreateCustomMessages() {
|
||||
"Vous avez un %rPack de&haricots magiques%w ! Trouvez&un endroit convenable pour un&jardin et plantez-les.^Ensuite, attendez quelque&chose d'amusant doit arriver !")
|
||||
};
|
||||
CreateGetItemMessages(getItemMessages);
|
||||
CreateScrubMessages();
|
||||
CreateMerchantMessages();
|
||||
CreateRupeeMessages();
|
||||
CreateNaviRandoMessages();
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class Randomizer {
|
||||
|
||||
static const std::string getItemMessageTableID;
|
||||
static const std::string hintMessageTableID;
|
||||
static const std::string scrubMessageTableID;
|
||||
static const std::string merchantMessageTableID;
|
||||
static const std::string rupeeMessageTableID;
|
||||
static const std::string NaviRandoMessageTableID;
|
||||
|
||||
|
@ -1583,7 +1583,7 @@ extern "C" ScrubIdentity Randomizer_IdentifyScrub(s32 sceneNum, s32 actorParams,
|
||||
}
|
||||
|
||||
extern "C" CustomMessageEntry Randomizer_GetScrubMessage(s16 itemPrice) {
|
||||
return CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, itemPrice);
|
||||
return CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, itemPrice);
|
||||
}
|
||||
|
||||
extern "C" CustomMessageEntry Randomizer_GetNaviMessage() {
|
||||
@ -1722,7 +1722,7 @@ extern "C" int CustomMessage_RetrieveIfExists(GlobalContext* globalCtx) {
|
||||
} else if (CVar_GetS32("gRandoRelevantNavi", 1) && textId >= 0x0140 && textId <= 0x015F) {
|
||||
messageEntry = Randomizer_GetNaviMessage();
|
||||
} else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESMAN) {
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::scrubMessageTableID, TEXT_BEAN_SALESMAN);
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::merchantMessageTableID, TEXT_BEAN_SALESMAN);
|
||||
}
|
||||
}
|
||||
if (textId == TEXT_GS_NO_FREEZE || textId == TEXT_GS_FREEZE) {
|
||||
|
Loading…
Reference in New Issue
Block a user