mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 13:27:22 -04:00
Solved another teleportation concurrent modification exception
This commit is contained in:
parent
9ef02cb1b2
commit
f773a547b3
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1.0 MiB |
@ -88,12 +88,10 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci
|
||||
if (offer.type == TradeType.City) {
|
||||
val city = from.cities.first { it.id == offer.name }
|
||||
city.moveToCiv(to)
|
||||
city.getCenterTile().getUnits().forEach { it.movement.teleportToClosestMoveableTile() }
|
||||
city.getCenterTile().getUnits().toList().forEach { it.movement.teleportToClosestMoveableTile() }
|
||||
for (tile in city.getTiles()) {
|
||||
for (unit in tile.getUnits().toList()) {
|
||||
if (!unit.civInfo.canEnterTiles(to)) {
|
||||
unit.movement.teleportToClosestMoveableTile()
|
||||
}
|
||||
if (!unit.civInfo.canEnterTiles(to)) unit.movement.teleportToClosestMoveableTile()
|
||||
}
|
||||
}
|
||||
to.updateViewableTiles()
|
||||
|
Loading…
x
Reference in New Issue
Block a user