diff --git a/core/src/com/unciv/logic/WorkerAutomation.kt b/core/src/com/unciv/logic/WorkerAutomation.kt index d983c0c304..a8b96ecbf4 100644 --- a/core/src/com/unciv/logic/WorkerAutomation.kt +++ b/core/src/com/unciv/logic/WorkerAutomation.kt @@ -36,7 +36,7 @@ public class WorkerAutomation(){ .getShortestPath(currentTile.position, it.position, 2f, 2, civInfo).isNotEmpty() } .maxBy { getPriority(it, civInfo) } - if (selectedTile != null && getPriority(selectedTile, civInfo) > 1) return selectedTile + if (selectedTile != null && getPriority(selectedTile, civInfo) > getPriority(currentTile,civInfo)) return selectedTile else return currentTile } diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt index 7c9ad719a8..cfdc570cae 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt @@ -2,7 +2,7 @@ package com.unciv.ui.worldscreen.unit import com.badlogic.gdx.scenes.scene2d.ui.TextButton import com.unciv.UnCivGame -import com.unciv.logic.Automation +import com.unciv.logic.WorkerAutomation import com.unciv.logic.map.MapUnit import com.unciv.logic.map.TileInfo import com.unciv.models.gamebasics.Building @@ -86,7 +86,7 @@ class UnitActions { actionList += UnitAction("Automate", { tile.unit!!.action = "automation" - Automation().automateWorkerAction(tile.unit!!) + WorkerAutomation().automateWorkerAction(tile.unit!!) },unit.currentMovement != 0f ) }