More civilopedia info for nation and improvement (#2190)
* A little more information in civilopedia for improvements and nations * Differentiate civilopedia and picker use * Missing lines in translations template * allTranslationsEndWithASpace test Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
This commit is contained in:
parent
8836800957
commit
c647261a18
5 changed files with 23 additions and 6 deletions
|
@ -536,6 +536,7 @@ Social policies = Sozialpolitiken
|
||||||
Community = Gemeinschaft
|
Community = Gemeinschaft
|
||||||
Close = Schließen
|
Close = Schließen
|
||||||
Do you want to exit the game? = Willst du das Spiel schließen?
|
Do you want to exit the game? = Willst du das Spiel schließen?
|
||||||
|
Start bias: = Start-Präferenz:
|
||||||
|
|
||||||
# City screen
|
# City screen
|
||||||
|
|
||||||
|
@ -708,6 +709,7 @@ Resources = Ressourcen
|
||||||
Terrains = Gelände
|
Terrains = Gelände
|
||||||
Tile Improvements = Modernisierungen
|
Tile Improvements = Modernisierungen
|
||||||
Unique to [civName], replaces [unitName] = Einzigartig für Zivilisation [civName], ersetzt [unitName]
|
Unique to [civName], replaces [unitName] = Einzigartig für Zivilisation [civName], ersetzt [unitName]
|
||||||
|
Unique to [civName] = Einzigartig für Zivilisation [civName]
|
||||||
Tutorials = Tutorials
|
Tutorials = Tutorials
|
||||||
Cost = Kosten
|
Cost = Kosten
|
||||||
May contain [listOfResources] = kann [listOfResources] enthalten
|
May contain [listOfResources] = kann [listOfResources] enthalten
|
||||||
|
|
|
@ -536,6 +536,7 @@ Social policies =
|
||||||
Community =
|
Community =
|
||||||
Close =
|
Close =
|
||||||
Do you want to exit the game? =
|
Do you want to exit the game? =
|
||||||
|
Start bias: =
|
||||||
|
|
||||||
# City screen
|
# City screen
|
||||||
|
|
||||||
|
@ -708,6 +709,7 @@ Resources =
|
||||||
Terrains =
|
Terrains =
|
||||||
Tile Improvements =
|
Tile Improvements =
|
||||||
Unique to [civName], replaces [unitName] =
|
Unique to [civName], replaces [unitName] =
|
||||||
|
Unique to [civName] =
|
||||||
Tutorials =
|
Tutorials =
|
||||||
Cost =
|
Cost =
|
||||||
May contain [listOfResources] =
|
May contain [listOfResources] =
|
||||||
|
|
|
@ -67,14 +67,23 @@ class Nation : INamed {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fun getUniqueString(ruleset: Ruleset): String {
|
fun getUniqueString(ruleset: Ruleset, forPickerScreen: Boolean = true): String {
|
||||||
val textList = ArrayList<String>()
|
val textList = ArrayList<String>()
|
||||||
|
|
||||||
if (unique != null) {
|
if (leaderName.isNotEmpty() && !forPickerScreen){
|
||||||
textList += unique!!.description.tr()
|
textList += getLeaderDisplayName().tr()
|
||||||
textList += ""
|
textList += ""
|
||||||
}
|
}
|
||||||
|
if (unique != null) {
|
||||||
|
textList += unique!!.displayName.tr() + ":"
|
||||||
|
textList += " " + unique!!.description.tr()
|
||||||
|
|
||||||
|
textList += ""
|
||||||
|
}
|
||||||
|
if (startBias.isNotEmpty()) {
|
||||||
|
textList += "Start bias:".tr() + startBias.joinToString(", ", " ") { it.tr() }
|
||||||
|
textList += ""
|
||||||
|
}
|
||||||
addUniqueBuildingsText(textList,ruleset)
|
addUniqueBuildingsText(textList,ruleset)
|
||||||
addUniqueUnitsText(textList,ruleset)
|
addUniqueUnitsText(textList,ruleset)
|
||||||
addUniqueImprovementsText(textList,ruleset)
|
addUniqueImprovementsText(textList,ruleset)
|
||||||
|
|
|
@ -30,9 +30,10 @@ class TileImprovement : NamedStats() {
|
||||||
return realTurnsToBuild.roundToInt()
|
return realTurnsToBuild.roundToInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getDescription(ruleset: Ruleset): String {
|
fun getDescription(ruleset: Ruleset, forPickerScreen: Boolean = true): String {
|
||||||
val stringBuilder = StringBuilder()
|
val stringBuilder = StringBuilder()
|
||||||
if (this.clone().toString().isNotEmpty()) stringBuilder.appendln(this.clone().toString())
|
if (this.clone().toString().isNotEmpty()) stringBuilder.appendln(this.clone().toString())
|
||||||
|
if (uniqueTo!=null && !forPickerScreen) stringBuilder.appendln("Unique to [$uniqueTo]".tr())
|
||||||
if (!terrainsCanBeBuiltOn.isEmpty()) {
|
if (!terrainsCanBeBuiltOn.isEmpty()) {
|
||||||
val terrainsCanBeBuiltOnString: ArrayList<String> = arrayListOf()
|
val terrainsCanBeBuiltOnString: ArrayList<String> = arrayListOf()
|
||||||
for (i in terrainsCanBeBuiltOn) {
|
for (i in terrainsCanBeBuiltOn) {
|
||||||
|
@ -53,6 +54,9 @@ class TileImprovement : NamedStats() {
|
||||||
|
|
||||||
if (techRequired != null) stringBuilder.appendln("Required tech: [$techRequired]".tr())
|
if (techRequired != null) stringBuilder.appendln("Required tech: [$techRequired]".tr())
|
||||||
|
|
||||||
|
for(unique in uniques)
|
||||||
|
stringBuilder.appendln (unique.tr())
|
||||||
|
|
||||||
return stringBuilder.toString()
|
return stringBuilder.toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,14 +67,14 @@ class CivilopediaScreen(ruleset: Ruleset) : CameraStageBaseScreen() {
|
||||||
categoryToEntries["Terrains"] = ruleset.terrains.values
|
categoryToEntries["Terrains"] = ruleset.terrains.values
|
||||||
.map { CivilopediaEntry(it.name,it.getDescription(ruleset)) }
|
.map { CivilopediaEntry(it.name,it.getDescription(ruleset)) }
|
||||||
categoryToEntries["Tile Improvements"] = ruleset.tileImprovements.values
|
categoryToEntries["Tile Improvements"] = ruleset.tileImprovements.values
|
||||||
.map { CivilopediaEntry(it.name,it.getDescription(ruleset),
|
.map { CivilopediaEntry(it.name,it.getDescription(ruleset,false),
|
||||||
ImageGetter.getImprovementIcon(it.name,50f)) }
|
ImageGetter.getImprovementIcon(it.name,50f)) }
|
||||||
categoryToEntries["Units"] = ruleset.units.values
|
categoryToEntries["Units"] = ruleset.units.values
|
||||||
.map { CivilopediaEntry(it.name,it.getDescription(false),
|
.map { CivilopediaEntry(it.name,it.getDescription(false),
|
||||||
ImageGetter.getConstructionImage(it.name)) }
|
ImageGetter.getConstructionImage(it.name)) }
|
||||||
categoryToEntries["Nations"] = ruleset.nations.values
|
categoryToEntries["Nations"] = ruleset.nations.values
|
||||||
.filter { it.isMajorCiv() }
|
.filter { it.isMajorCiv() }
|
||||||
.map { CivilopediaEntry(it.name,it.getUniqueString(ruleset),
|
.map { CivilopediaEntry(it.name,it.getUniqueString(ruleset,false),
|
||||||
ImageGetter.getNationIndicator(it,50f)) }
|
ImageGetter.getNationIndicator(it,50f)) }
|
||||||
categoryToEntries["Technologies"] = ruleset.technologies.values
|
categoryToEntries["Technologies"] = ruleset.technologies.values
|
||||||
.map { CivilopediaEntry(it.name,it.getDescription(ruleset),
|
.map { CivilopediaEntry(it.name,it.getDescription(ruleset),
|
||||||
|
|
Loading…
Reference in a new issue