mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 15:30:43 -04:00
Wonder uniques now displayed in cities (thanks Kumārikā Bālā for pointing out the problem!)
This commit is contained in:
parent
0f4accb5a4
commit
52dc1931cc
@ -111,7 +111,7 @@ class Building : NamedStats(), IConstruction{
|
|||||||
stringBuilder.appendln("Requires a $requiredBuildingInAllCities to be built in all cities")
|
stringBuilder.appendln("Requires a $requiredBuildingInAllCities to be built in all cities")
|
||||||
if (providesFreeBuilding != null)
|
if (providesFreeBuilding != null)
|
||||||
stringBuilder.appendln("Provides a free $providesFreeBuilding in this city")
|
stringBuilder.appendln("Provides a free $providesFreeBuilding in this city")
|
||||||
if(uniques.isNotEmpty()) stringBuilder.appendln(uniques.map { it.tr() }.joinToString { "\n" })
|
if(uniques.isNotEmpty()) stringBuilder.appendln(uniques.asSequence().map { it.tr() }.joinToString("\n"))
|
||||||
if (stats.toString() != "")
|
if (stats.toString() != "")
|
||||||
stringBuilder.appendln(stats)
|
stringBuilder.appendln(stats)
|
||||||
if (this.percentStatBonus != null) {
|
if (this.percentStatBonus != null) {
|
||||||
|
@ -146,9 +146,10 @@ fun String.tr(): String {
|
|||||||
return languageSpecificPlaceholder.tr()
|
return languageSpecificPlaceholder.tr()
|
||||||
}
|
}
|
||||||
if(contains("{")){ // sentence
|
if(contains("{")){ // sentence
|
||||||
return Regex("\\{(.*?)\\}").replace(this,{matchResult -> matchResult.groups[1]!!.value.tr() })
|
return Regex("\\{(.*?)\\}").replace(this) { it.groups[1]!!.value.tr() }
|
||||||
}
|
}
|
||||||
else return GameBasics.Translations.get(this,UnCivGame.Current.settings.language) // single word
|
val translation = GameBasics.Translations.get(this,UnCivGame.Current.settings.language) // single word
|
||||||
|
return translation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ class WorldScreenDisplayOptionsTable() : PopupTable(){
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(languageSelectBox.selected.percentComplete!=100) {
|
||||||
add(Label("Missing translations:", CameraStageBaseScreen.skin)).pad(5f).row()
|
add(Label("Missing translations:", CameraStageBaseScreen.skin)).pad(5f).row()
|
||||||
val missingTextSelectBox = SelectBox<String>(CameraStageBaseScreen.skin)
|
val missingTextSelectBox = SelectBox<String>(CameraStageBaseScreen.skin)
|
||||||
val missingTextArray = com.badlogic.gdx.utils.Array<String>()
|
val missingTextArray = com.badlogic.gdx.utils.Array<String>()
|
||||||
@ -65,6 +66,7 @@ class WorldScreenDisplayOptionsTable() : PopupTable(){
|
|||||||
missingTextSelectBox.items = missingTextArray
|
missingTextSelectBox.items = missingTextArray
|
||||||
missingTextSelectBox.selected = "Untranslated texts"
|
missingTextSelectBox.selected = "Untranslated texts"
|
||||||
add(missingTextSelectBox).pad(10f).width(UnCivGame.Current.worldScreen.stage.width / 2).row()
|
add(missingTextSelectBox).pad(10f).width(UnCivGame.Current.worldScreen.stage.width / 2).row()
|
||||||
|
}
|
||||||
|
|
||||||
val resolutionSelectBox= SelectBox<String>(CameraStageBaseScreen.skin)
|
val resolutionSelectBox= SelectBox<String>(CameraStageBaseScreen.skin)
|
||||||
val resolutionArray = com.badlogic.gdx.utils.Array<String>()
|
val resolutionArray = com.badlogic.gdx.utils.Array<String>()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user