Upgradable units show the final unit they're upgrading to in the Overview screen

This commit is contained in:
Yair Morgenstern 2020-07-25 22:03:45 +03:00
parent 8463d0a884
commit a5f7aee1ea

View file

@ -290,7 +290,7 @@ class EmpireOverviewScreen(private var viewingPlayer:CivilizationInfo, defaultPa
for(promotion in promotionsForUnit)
promotionsTable.add(ImageGetter.getPromotionIcon(promotion.name))
if (unit.promotions.canBePromoted()) promotionsTable.add(ImageGetter.getImage("OtherIcons/Star").apply { color= Color.GOLDENROD }).size(24f).padLeft(8f)
if (unit.canUpgrade()) promotionsTable.add(ImageGetter.getUnitIcon(baseUnit.upgradesTo!!, Color.GREEN)).size(28f).padLeft(8f)
if (unit.canUpgrade()) promotionsTable.add(ImageGetter.getUnitIcon(unit.getUnitToUpgradeTo().name, Color.GREEN)).size(28f).padLeft(8f)
promotionsTable.onClick {
if (unit.promotions.canBePromoted() || unit.promotions.promotions.isNotEmpty()) {
game.setScreen(PromotionPickerScreen(unit))