Resolved #2285 - workers no longer try to work tiles within range of an enemy city

This commit is contained in:
Yair Morgenstern
2020-04-13 12:40:52 +03:00
parent 941bc37c59
commit 13bb1eb7c7

View File

@ -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) }