Fix Civilopedia requiredBuilding links for Wonders (#13442)

This commit is contained in:
Rob Loach 2025-06-15 04:23:25 -04:00 committed by GitHub
parent 686180fe4f
commit f3511f99f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -182,9 +182,13 @@ object BuildingDescriptions {
if (requiredTech != null)
textList += FormattedLine("Required tech: [$requiredTech]",
link="Technology/$requiredTech")
if (requiredBuilding != null)
textList += FormattedLine("Requires [$requiredBuilding] to be built in the city",
link="Building/$requiredBuilding")
if (requiredBuilding != null) {
val linkType = if (ruleset.buildings[requiredBuilding]?.isWonder == true) "Wonder" else "Building"
textList += FormattedLine(
"Requires [$requiredBuilding] to be built in the city",
link="$linkType/$requiredBuilding"
)
}
if (requiredResource != null) {
textList += FormattedLine()