Merge branch 'develop-rando' of garrettjoecox.github.com:HarbourMasters/Shipwright into develop-rando-changes

This commit is contained in:
Garrett Cox 2024-04-23 11:31:39 -05:00
commit 7bde0f5289
2 changed files with 11 additions and 5 deletions

View File

@ -2614,7 +2614,11 @@ CustomMessage Randomizer::ReplaceWithItemName(CustomMessage message, std::string
ctx->overrides[hintedCheck].GetTrickName().english ctx->overrides[hintedCheck].GetTrickName().english
}; };
} else { } else {
itemName = EnumToSpoilerfileGetName[targetRG]; itemName = {
Rando::StaticData::RetrieveItem(targetRG).GetName().english,
Rando::StaticData::RetrieveItem(targetRG).GetName().french,
Rando::StaticData::RetrieveItem(targetRG).GetName().english,
};
} }
message.Replace(std::move(toReplace), std::move(itemName[0]), std::move(itemName[1]), std::move(itemName[2])); message.Replace(std::move(toReplace), std::move(itemName[0]), std::move(itemName[1]), std::move(itemName[2]));
return message; return message;
@ -2746,7 +2750,12 @@ CustomMessage Randomizer::GetMerchantMessage(RandomizerInf randomizerInf, u16 te
std::string(ctx->overrides[rc].GetTrickName().english) std::string(ctx->overrides[rc].GetTrickName().english)
}; };
} else { } else {
shopItemName = EnumToSpoilerfileGetName[shopItemGet]; auto shopItem = Rando::StaticData::RetrieveItem(shopItemGet);
shopItemName = {
shopItem.GetName().english,
shopItem.GetName().french,
shopItem.GetName().english,
};
} }
u16 shopItemPrice = ctx->GetItemLocation(rc)->GetPrice(); u16 shopItemPrice = ctx->GetItemLocation(rc)->GetPrice();

View File

@ -39,9 +39,6 @@ class Randomizer {
static const std::string IceTrapRandoMessageTableID; static const std::string IceTrapRandoMessageTableID;
static const std::string randoMiscHintsTableID; static const std::string randoMiscHintsTableID;
// Public for now to be accessed by SaveManager, will be made private again soon :tm:
std::unordered_map<RandomizerGet, std::array<std::string, 3>> EnumToSpoilerfileGetName;
static Sprite* GetSeedTexture(uint8_t index); static Sprite* GetSeedTexture(uint8_t index);
bool SpoilerFileExists(const char* spoilerFileName); bool SpoilerFileExists(const char* spoilerFileName);
void LoadMerchantMessages(); void LoadMerchantMessages();