mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Fixed : unit upgrades to itself with 10 gold.
This commit is contained in:
parent
3086520bd2
commit
11bb63495b
@ -229,6 +229,7 @@ class MapUnit {
|
|||||||
// if we don't remove the unit before the check it's return false!
|
// if we don't remove the unit before the check it's return false!
|
||||||
|
|
||||||
val unitToUpgradeTo = getUnitToUpgradeTo()
|
val unitToUpgradeTo = getUnitToUpgradeTo()
|
||||||
|
if (name == unitToUpgradeTo.name) return false
|
||||||
civInfo.removeUnit(this)
|
civInfo.removeUnit(this)
|
||||||
val canUpgrade = unitToUpgradeTo.isBuildable(civInfo)
|
val canUpgrade = unitToUpgradeTo.isBuildable(civInfo)
|
||||||
civInfo.addUnit(this)
|
civInfo.addUnit(this)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user