Resolved #3740 - units retain individual names when upgrading

This commit is contained in:
Yair Morgenstern
2021-03-24 22:51:05 +02:00
parent e0d7128bc6
commit db75067b7c
2 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,5 @@
package com.unciv.logic.map
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.math.Vector2
import com.unciv.Constants
import com.unciv.UncivGame

View File

@ -244,6 +244,7 @@ object UnitActions {
val newunit = unit.civInfo.placeUnitNearTile(unitTile.position, upgradedUnit.name)!!
newunit.health = unit.health
newunit.promotions = unit.promotions
newunit.instanceName = unit.instanceName
for (promotion in newunit.baseUnit.promotions)
if (promotion !in newunit.promotions.promotions)