TileTable no longer displays health of civilian units

This commit is contained in:
Yair Morgenstern
2018-04-08 10:00:24 +03:00
parent d8a5acb6f2
commit e476e5862d
2 changed files with 6 additions and 2 deletions

View File

@ -151,7 +151,11 @@ class TileInfo {
if (roadStatus !== RoadStatus.None && !isCityCenter) SB.appendln(roadStatus)
if (improvement != null) SB.appendln(improvement!!)
if (improvementInProgress != null) SB.appendln("$improvementInProgress in ${this.turnsToImprovement} turns")
if (unit != null) SB.appendln(unit!!.name + "(" + unit!!.health + ")")
if (unit != null){
var unitString = unit!!.name
if(unit!!.getBaseUnit().unitType!=UnitType.Civilian) unitString += "(" + unit!!.health + ")"
SB.appendln(unitString)
}
return SB.toString()
}

View File

@ -24,7 +24,7 @@ class UnitTable(val worldScreen: WorldScreen) : Table(){
.tint(Color(0x004085bf))
pad(20f)
background = tileTableBackground
add(unitLabel)
add(unitLabel).pad(10f)
add(unitActionsTable)
row()
add(idleUnitButton).colspan(2)