mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-10 04:43:29 +07:00
Fixed "cannot upgrade to last unit"
This commit is contained in:
parent
78c4f6de68
commit
fd0279c187
@ -502,8 +502,8 @@ class MapUnit : IsPartOfGameInfoSerialization {
|
|||||||
val upgradeList = arrayListOf<BaseUnit>()
|
val upgradeList = arrayListOf<BaseUnit>()
|
||||||
while (currentUnit.upgradesTo != null){
|
while (currentUnit.upgradesTo != null){
|
||||||
val nextUpgrade = civInfo.getEquivalentUnit(currentUnit.upgradesTo!!)
|
val nextUpgrade = civInfo.getEquivalentUnit(currentUnit.upgradesTo!!)
|
||||||
upgradeList.add(currentUnit)
|
|
||||||
currentUnit = nextUpgrade
|
currentUnit = nextUpgrade
|
||||||
|
upgradeList.add(currentUnit)
|
||||||
}
|
}
|
||||||
return upgradeList
|
return upgradeList
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user