Resolved #1434 Resolved #1363 - Workers no longer build tiles on other civ's territory

This commit is contained in:
Yair Morgenstern
2019-12-09 18:53:04 +02:00
parent caf98b8470
commit a90059988b

View File

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