mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 06:51:30 -04: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 }
|
val city = from.cities.first { it.id == offer.name }
|
||||||
city.moveToCiv(to)
|
city.moveToCiv(to)
|
||||||
city.getCenterTile().getUnits().forEach { it.movement.teleportToClosestMoveableTile() }
|
city.getCenterTile().getUnits().forEach { it.movement.teleportToClosestMoveableTile() }
|
||||||
city.getTiles().forEach{ tile ->
|
for (tile in city.getTiles()) {
|
||||||
tile.getUnits().forEach{ unit ->
|
for (unit in tile.getUnits().toList()) {
|
||||||
if (!unit.civInfo.canEnterTiles(to)) {
|
if (!unit.civInfo.canEnterTiles(to)) {
|
||||||
unit.movement.teleportToClosestMoveableTile()
|
unit.movement.teleportToClosestMoveableTile()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user