mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 05:14:32 -04:00
Fix 'move to tile' for new movement (#10887)
This commit is contained in:
parent
87ee874f4b
commit
93f4817729
@ -14,7 +14,7 @@ import java.util.TreeSet
|
||||
|
||||
|
||||
fun List<UnitMovement.MovementStep>.toBackwardsCompatiblePath(): List<Tile> {
|
||||
val backwardsCompatiblePath = this.reversed().filter { it.totalCost.movementLeft == 0f || it == this.last() }
|
||||
val backwardsCompatiblePath = this.filter { it.totalCost.movementLeft == 0f || it == this.last() }
|
||||
return backwardsCompatiblePath.map { it.tile }
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user