Percentage increases from buildings displayed in tech picking screen

This commit is contained in:
Yair Morgenstern
2018-11-06 20:29:48 +02:00
parent f73d840a9d
commit a062b02bb5
2 changed files with 5 additions and 1 deletions

View File

@ -51,6 +51,10 @@ class Building : NamedStats(), IConstruction{
val infoList= mutableListOf<String>()
val str = getStats(hashSetOf()).toString()
if(str.isNotEmpty()) infoList += str
if(percentStatBonus!=null){
for(stat in percentStatBonus!!.toHashMap())
if(stat.value!=0f) infoList+="+${stat.value.toInt()}% ${stat.key}"
}
val improvedResources = GameBasics.TileResources.values.filter { it.building==name }.map { it.name.tr() }
if(improvedResources.isNotEmpty()){
// buildings that improve resources