mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
Add city size (population) to TradeOffer.kt (#8956)
* Add city size (population) to TradeOffer.kt * Add .tr() to city name * Improve i18n * Deprove i18n
This commit is contained in:
@ -38,7 +38,11 @@ data class TradeOffer(val name: String, val type: TradeType, var amount: Int = 1
|
||||
var offerText = when(type){
|
||||
TradeType.WarDeclaration -> "Declare war on [$name]"
|
||||
TradeType.Introduction -> "Introduction to [$name]"
|
||||
TradeType.City -> UncivGame.Current.gameInfo!!.getCities().firstOrNull{ it.id == name }?.name ?: "Non-existent city"
|
||||
TradeType.City -> {
|
||||
val city =
|
||||
UncivGame.Current.gameInfo!!.getCities().firstOrNull { it.id == name }
|
||||
city?.run { "{$name} (${population.population})" } ?: "Non-existent city"
|
||||
}
|
||||
else -> name
|
||||
}.tr()
|
||||
|
||||
|
Reference in New Issue
Block a user