Resolved #12308 - Wait action selects next unit

This commit is contained in:
yairm210 2024-10-22 12:41:13 +03:00
parent 44d08c8703
commit 591805b26b
2 changed files with 3 additions and 3 deletions

View File

@ -381,8 +381,7 @@ object UnitActions {
type = UnitActionType.Wait,
useFrequency = 65f, // Preferably have this on the first page
action = {
unit.due = false
GUI.getWorldScreen().switchToNextUnit()
unit.due = false // Skips to next unit due to worldScreen.switchToNextUnit() in activateAction
}
))
}

View File

@ -179,7 +179,8 @@ class UnitActionsTable(val worldScreen: WorldScreen) : Table() {
// overlay, since the user definitely wants to interact with the new unit.
worldScreen.mapHolder.removeUnitActionOverlay()
if (!UncivGame.Current.settings.autoUnitCycle) return
if (unit.isDestroyed || unitAction.type.isSkippingToNextUnit && (unit.isMoving() && !unit.hasMovement() || !unit.isMoving()))
if (unit.isDestroyed ||
unitAction.type.isSkippingToNextUnit && (!unit.isMoving() || !unit.hasMovement()))
worldScreen.switchToNextUnit()
else worldScreen.bottomUnitTable.selectedUnitHasChanged = true
}