From a90059988baea2b3fea06672b426c984307a89c4 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 9 Dec 2019 18:53:04 +0200 Subject: [PATCH] Resolved #1434 Resolved #1363 - Workers no longer build tiles on other civ's territory --- core/src/com/unciv/logic/automation/WorkerAutomation.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/automation/WorkerAutomation.kt b/core/src/com/unciv/logic/automation/WorkerAutomation.kt index 9240583412..e81ba611d3 100644 --- a/core/src/com/unciv/logic/automation/WorkerAutomation.kt +++ b/core/src/com/unciv/logic/automation/WorkerAutomation.kt @@ -168,8 +168,9 @@ class WorkerAutomation(val unit: MapUnit) { priority += 2 if (tileInfo.isWorked()) priority += 3 } - else if (tileInfo.neighbors.any { it.getOwner() != null }) priority += 1 - if (tileInfo.hasViewableResource(civInfo)) priority += 1 + // give a minor priority to tiles that we could expand onto + else if (tileInfo.getOwner()==null && tileInfo.neighbors.any { it.getOwner() ==civInfo }) priority += 1 + if (priority!=0 && tileInfo.hasViewableResource(civInfo)) priority += 1 return priority }