mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-13 19:39:34 +07: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")
|
||||
if (providesFreeBuilding != null)
|
||||
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() != "")
|
||||
stringBuilder.appendln(stats)
|
||||
if (this.percentStatBonus != null) {
|
||||
|
@ -146,9 +146,10 @@ fun String.tr(): String {
|
||||
return languageSpecificPlaceholder.tr()
|
||||
}
|
||||
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,14 +57,16 @@ class WorldScreenDisplayOptionsTable() : PopupTable(){
|
||||
}
|
||||
})
|
||||
|
||||
add(Label("Missing translations:",CameraStageBaseScreen.skin)).pad(5f).row()
|
||||
val missingTextSelectBox = SelectBox<String>(CameraStageBaseScreen.skin)
|
||||
val missingTextArray = com.badlogic.gdx.utils.Array<String>()
|
||||
val currentLanguage = UnCivGame.Current.settings.language
|
||||
GameBasics.Translations.filter { !it.value.containsKey(currentLanguage) }.forEach{missingTextArray.add(it.key)}
|
||||
missingTextSelectBox.items = missingTextArray
|
||||
missingTextSelectBox.selected="Untranslated texts"
|
||||
add(missingTextSelectBox).pad(10f).width(UnCivGame.Current.worldScreen.stage.width/2).row()
|
||||
if(languageSelectBox.selected.percentComplete!=100) {
|
||||
add(Label("Missing translations:", CameraStageBaseScreen.skin)).pad(5f).row()
|
||||
val missingTextSelectBox = SelectBox<String>(CameraStageBaseScreen.skin)
|
||||
val missingTextArray = com.badlogic.gdx.utils.Array<String>()
|
||||
val currentLanguage = UnCivGame.Current.settings.language
|
||||
GameBasics.Translations.filter { !it.value.containsKey(currentLanguage) }.forEach { missingTextArray.add(it.key) }
|
||||
missingTextSelectBox.items = missingTextArray
|
||||
missingTextSelectBox.selected = "Untranslated texts"
|
||||
add(missingTextSelectBox).pad(10f).width(UnCivGame.Current.worldScreen.stage.width / 2).row()
|
||||
}
|
||||
|
||||
val resolutionSelectBox= SelectBox<String>(CameraStageBaseScreen.skin)
|
||||
val resolutionArray = com.badlogic.gdx.utils.Array<String>()
|
||||
|
Loading…
Reference in New Issue
Block a user