mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-01 08:05:07 -04:00
Fix issue with item name replacement at runtime. (#4068)
This commit is contained in:
parent
39e6269731
commit
99fbecd951
@ -2613,7 +2613,11 @@ CustomMessage Randomizer::ReplaceWithItemName(CustomMessage message, std::string
|
||||
ctx->overrides[hintedCheck].GetTrickName().english
|
||||
};
|
||||
} 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]));
|
||||
return message;
|
||||
@ -2745,7 +2749,12 @@ CustomMessage Randomizer::GetMerchantMessage(RandomizerInf randomizerInf, u16 te
|
||||
std::string(ctx->overrides[rc].GetTrickName().english)
|
||||
};
|
||||
} 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();
|
||||
|
||||
|
@ -39,9 +39,6 @@ class Randomizer {
|
||||
static const std::string IceTrapRandoMessageTableID;
|
||||
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);
|
||||
bool SpoilerFileExists(const char* spoilerFileName);
|
||||
void LoadMerchantMessages();
|
||||
|
Loading…
Reference in New Issue
Block a user