mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-09 19:01:12 -04:00
fix required dungeons sign when no dungeons are required
This commit is contained in:
@@ -1506,6 +1506,11 @@ Hyrule Castle:
|
||||
Cryptic:
|
||||
Text: the {kingdom's castle}
|
||||
|
||||
# NO REQUIRED DUNGEON TEXT
|
||||
No Required Dungeons Text:
|
||||
Standard:
|
||||
Text: No Required Dungeons
|
||||
|
||||
# ITEM GET TEXT
|
||||
Foolish Get Item Text:
|
||||
Standard:
|
||||
|
||||
@@ -1506,6 +1506,11 @@ Hyrule Castle:
|
||||
Cryptic:
|
||||
Text: the {kingdom's castle}
|
||||
|
||||
# NO REQUIRED DUNGEON TEXT
|
||||
No Required Dungeons Text:
|
||||
Standard:
|
||||
Text: No Required Dungeons
|
||||
|
||||
# ITEM GET TEXT
|
||||
Foolish Get Item Text:
|
||||
Standard:
|
||||
|
||||
@@ -1506,6 +1506,11 @@ Hyrule Castle:
|
||||
Cryptic:
|
||||
Text: the {kingdom's castle}
|
||||
|
||||
# NO REQUIRED DUNGEON TEXT
|
||||
No Required Dungeons Text:
|
||||
Standard:
|
||||
Text: No Required Dungeons
|
||||
|
||||
# ITEM GET TEXT
|
||||
Foolish Get Item Text:
|
||||
Standard:
|
||||
|
||||
@@ -1506,6 +1506,11 @@ Hyrule Castle:
|
||||
Cryptic:
|
||||
Text: the {kingdom's castle}
|
||||
|
||||
# NO REQUIRED DUNGEON TEXT
|
||||
No Required Dungeons Text:
|
||||
Standard:
|
||||
Text: No Required Dungeons
|
||||
|
||||
# ITEM GET TEXT
|
||||
Foolish Get Item Text:
|
||||
Standard:
|
||||
|
||||
@@ -1506,6 +1506,11 @@ Hyrule Castle:
|
||||
Cryptic:
|
||||
Text: the {kingdom's castle}
|
||||
|
||||
# NO REQUIRED DUNGEON TEXT
|
||||
No Required Dungeons Text:
|
||||
Standard:
|
||||
Text: No Required Dungeons
|
||||
|
||||
# ITEM GET TEXT
|
||||
Foolish Get Item Text:
|
||||
Standard:
|
||||
|
||||
@@ -26,6 +26,10 @@ namespace randomizer::logic::hints {
|
||||
requiredDungeonText += dungeonColors.at(dungeonName) + getTextObject(dungeonName) + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (requiredDungeonText.empty()) {
|
||||
requiredDungeonText += getTextObject("No Required Dungeons Text");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -185,6 +185,15 @@ namespace randomizer {
|
||||
}
|
||||
}
|
||||
|
||||
bool Text::empty() const {
|
||||
for (auto& text : mText) {
|
||||
if (!text.empty()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Text& Text::operator+=(const Text& rhs) {
|
||||
for (size_t i = 0; i < mText.size(); ++i) {
|
||||
mText[i] += rhs.mText[i];
|
||||
|
||||
@@ -68,10 +68,11 @@ namespace randomizer {
|
||||
*
|
||||
* @param oldStr the string to replace
|
||||
* @param replacementText the Text object to replace the old string
|
||||
* @param count the number of occurences to replace
|
||||
* @param count the number of occurrences to replace
|
||||
*/
|
||||
void Replace(const std::string& oldStr, const Text& replacementText, int count = 1);
|
||||
void Replace(const std::string& oldStr, const std::string& replacementText, int count = 1);
|
||||
bool empty() const;
|
||||
Text& operator+=(const Text& rhs);
|
||||
Text& operator+=(const std::string& rhs);
|
||||
friend Text operator+(Text lhs, Text& rhs);
|
||||
|
||||
Reference in New Issue
Block a user