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

@ -49,7 +49,7 @@
policies:[
{
name:"Collective Rule",
description:"Training of settlers increaed +50% in capital, recieve a new settler near capital",
description:"Training of settlers increased +50% in capital, recieve a new settler near capital",
row:1,
column:1
},

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