mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-11 11:28:03 +07:00
Fixed comodification errors under certain circumstances (#4599)
This commit is contained in:
parent
54df4ba0c0
commit
41f9fbfed2
@ -89,8 +89,8 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci
|
||||
val city = from.cities.first { it.id == offer.name }
|
||||
city.moveToCiv(to)
|
||||
city.getCenterTile().getUnits().forEach { it.movement.teleportToClosestMoveableTile() }
|
||||
city.getTiles().forEach{ tile ->
|
||||
tile.getUnits().forEach{ unit ->
|
||||
for (tile in city.getTiles()) {
|
||||
for (unit in tile.getUnits().toList()) {
|
||||
if (!unit.civInfo.canEnterTiles(to)) {
|
||||
unit.movement.teleportToClosestMoveableTile()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user