mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 21:03:15 -04:00
Units passed with 'next unit' are not returned to
This commit is contained in:
parent
859cc829f2
commit
fc5b8bc73d
@ -174,6 +174,7 @@ class MapUnit : IsPartOfGameInfoSerialization {
|
|||||||
|
|
||||||
var attacksThisTurn = 0
|
var attacksThisTurn = 0
|
||||||
var promotions = UnitPromotions()
|
var promotions = UnitPromotions()
|
||||||
|
/** Indicates if unit should be located with 'next unit' action */
|
||||||
var due: Boolean = true
|
var due: Boolean = true
|
||||||
var isTransported: Boolean = false
|
var isTransported: Boolean = false
|
||||||
var turnsFortified = 0
|
var turnsFortified = 0
|
||||||
|
@ -47,7 +47,6 @@ import com.unciv.ui.saves.LoadGameScreen
|
|||||||
import com.unciv.ui.saves.QuickSave
|
import com.unciv.ui.saves.QuickSave
|
||||||
import com.unciv.ui.saves.SaveGameScreen
|
import com.unciv.ui.saves.SaveGameScreen
|
||||||
import com.unciv.ui.utils.BaseScreen
|
import com.unciv.ui.utils.BaseScreen
|
||||||
import com.unciv.ui.utils.Fonts
|
|
||||||
import com.unciv.ui.utils.KeyCharAndCode
|
import com.unciv.ui.utils.KeyCharAndCode
|
||||||
import com.unciv.ui.utils.extensions.centerX
|
import com.unciv.ui.utils.extensions.centerX
|
||||||
import com.unciv.ui.utils.extensions.darken
|
import com.unciv.ui.utils.extensions.darken
|
||||||
@ -641,6 +640,8 @@ class WorldScreen(
|
|||||||
|
|
||||||
fun switchToNextUnit() {
|
fun switchToNextUnit() {
|
||||||
// Try to select something new if we already have the next pending unit selected.
|
// Try to select something new if we already have the next pending unit selected.
|
||||||
|
if (bottomUnitTable.selectedUnit != null)
|
||||||
|
bottomUnitTable.selectedUnit!!.due = false
|
||||||
val nextDueUnit = viewingCiv.cycleThroughDueUnits(bottomUnitTable.selectedUnit)
|
val nextDueUnit = viewingCiv.cycleThroughDueUnits(bottomUnitTable.selectedUnit)
|
||||||
if (nextDueUnit != null) {
|
if (nextDueUnit != null) {
|
||||||
mapHolder.setCenterPosition(
|
mapHolder.setCenterPosition(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user