Revert "Worker automation takes city focus and civ personality into account"

This reverts commit a9595549bc.
This commit is contained in:
Yair Morgenstern
2024-03-14 12:29:34 +02:00
parent 0eb79c5209
commit 0f3ff99d1f

View File

@ -410,10 +410,7 @@ class WorkerAutomation(
if (tile.getOwner() != unit.civ) if (tile.getOwner() != unit.civ)
stats.div(3f) stats.div(3f)
val city = tile.getWorkingCity() ?: tile.owningCity ?: tile.getTilesInDistance(3).firstOrNull { it.isCityCenter() }?.getCity() var value = Automation.rankStatsValue(stats, unit.civ)
var value = if (city != null) Automation.rankStatsForCityWork(stats, city, false, localUniqueCache)
else Automation.rankStatsValue(stats, unit.civ)
// Calculate the bonus from gaining the resources, this isn't included in the stats above // Calculate the bonus from gaining the resources, this isn't included in the stats above
if (tile.resource != null && tile.tileResource.resourceType != ResourceType.Bonus) { if (tile.resource != null && tile.tileResource.resourceType != ResourceType.Bonus) {
// A better resource ranking system might be required, we don't want the improvement // A better resource ranking system might be required, we don't want the improvement