mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 05:41:11 +07:00
Resolved #2285 - workers no longer try to work tiles within range of an enemy city
This commit is contained in:
@ -122,6 +122,8 @@ class WorkerAutomation(val unit: MapUnit) {
|
||||
.filter {
|
||||
(it.civilianUnit == null || it == currentTile)
|
||||
&& tileCanBeImproved(it, unit.civInfo)
|
||||
&& it.getTilesInDistance(2)
|
||||
.none { it.isCityCenter() && it.getCity()!!.civInfo.isAtWarWith(unit.civInfo) }
|
||||
}
|
||||
.sortedByDescending { getPriority(it, unit.civInfo) }
|
||||
|
||||
|
Reference in New Issue
Block a user