mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-10 19:06:51 -04:00
add item text replacements
This commit is contained in:
@@ -20,16 +20,61 @@ namespace randomizer::logic::hints {
|
||||
};
|
||||
|
||||
for (const auto& world : worlds) {
|
||||
auto& requiredDungeonText = world->AddDynamicTextStr("Links House Sign");
|
||||
for (const auto& [name, dungeon] : world->GetDungeonTable()) {
|
||||
auto& requiredDungeonText = world->AddNewText("Links House Sign");
|
||||
for (const auto& [dungeonName, dungeon] : world->GetDungeonTable()) {
|
||||
if (dungeon->IsRequired()) {
|
||||
requiredDungeonText += dungeonColors.at(name) + name + "\n";
|
||||
requiredDungeonText += dungeonColors.at(dungeonName) + getTextObject(dungeonName) + "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void doItemTextReplacement(const std::unique_ptr<world::World>& world,
|
||||
const std::string& locationName,
|
||||
const std::list<std::string>& textNames,
|
||||
Text::Color color) {
|
||||
auto itemName = world->GetLocation(locationName)->GetCurrentItem()->GetName();
|
||||
auto itemStandardName = addColor(getTextObject(itemName), color, 1, true);
|
||||
auto itemPrettyName = addColor(getTextObject(itemName, Text::PRETTY), color);
|
||||
for (const auto& textName : textNames) {
|
||||
auto& text = world->AddNewText(textName);
|
||||
text = getTextObject(textName + " Template");
|
||||
text.Replace("<Item Standard Name>", itemStandardName);
|
||||
text.Replace("<Item Pretty Name>", itemPrettyName);
|
||||
}
|
||||
}
|
||||
|
||||
static void GenerateItemTextReplacements(world::WorldPool& worlds) {
|
||||
for (const auto& world : worlds) {
|
||||
doItemTextReplacement(world, "Fishing Hole Bottle", {"Fishing Hole Sign Text"}, Text::GREEN);
|
||||
doItemTextReplacement(world, "Charlo Donation Blessing", {"Charlo Donation Ask Text"}, Text::GREEN);
|
||||
doItemTextReplacement(world, "Sera Shop Slingshot", {"Slingshot Shop Text",
|
||||
"Slingshot Shop Too Expensive Text", "Slingshot Shop Purchase Confirmation Text",
|
||||
"Slingshot Shop After Purchase Text"}, Text::ORANGE);
|
||||
|
||||
doItemTextReplacement(world, "Barnes Bomb Bag", {"Barnes Special Offer Text"}, Text::ORANGE);
|
||||
doItemTextReplacement(world, "Kakariko Village Malo Mart Wooden Shield", {"Kakariko Malo Mart Wooden Shield Purchase Confirmation Text",
|
||||
"Kakariko Malo Mart Wooden Shield Too Expensive Text", "Kakariko Malo Mart Wooden Shield Text"}, Text::ORANGE);
|
||||
|
||||
doItemTextReplacement(world, "Kakariko Village Malo Mart Hylian Shield", {"Kakariko Malo Mart Hylian Shield Purchase Confirmation Text",
|
||||
"Kakariko Malo Mart Hylian Shield Too Expensive Text", "Kakariko Malo Mart Hylian Shield After Purchase Text",
|
||||
"Kakariko Malo Mart Hylian Shield Text"}, Text::ORANGE);
|
||||
|
||||
doItemTextReplacement(world, "Kakariko Village Malo Mart Red Potion", {"Kakariko Malo Mart Red Potion Too Expensive Text",
|
||||
"Kakariko Malo Mart Red Potion Purchase Confirmation Text", "Kakariko Malo Mart Red Potion Text"}, Text::ORANGE);
|
||||
|
||||
doItemTextReplacement(world, "Kakariko Village Malo Mart Hawkeye", {"Kakariko Malo Mart Hawkeye Purchase Confirmation Text",
|
||||
"Kakariko Malo Mart Hawkeye Too Expensive Text", "Kakariko Malo Mart Hawkeye After Purchase Text",
|
||||
"Kakariko Malo Mart Hawkeye Coming Soon Text", "Kakariko Malo Mart Hawkeye Text"}, Text::ORANGE);
|
||||
|
||||
doItemTextReplacement(world, "Castle Town Malo Mart Magic Armor", {"Chudleys Shop Magic Armor Text",
|
||||
"Castle Town Malo Mart Magic Armor After Purchase Text", "Castle Town Malo Mart Magic Armor Text",
|
||||
"Castle Town Malo Mart Magic Armor Sold Out Text"}, Text::ORANGE);
|
||||
}
|
||||
}
|
||||
|
||||
void GenerateAllHints(world::WorldPool& worlds) {
|
||||
GenerateRequiredDungeonsHint(worlds);
|
||||
GenerateItemTextReplacements(worlds);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user