Resolved #10640 - start turn with unit selected

This commit is contained in:
Yair Morgenstern 2023-12-01 10:25:59 +02:00
parent f36b05f6c0
commit 37586370ea

View File

@ -11,7 +11,6 @@ import com.unciv.Constants
import com.unciv.UncivGame
import com.unciv.logic.GameInfo
import com.unciv.logic.UncivShowableException
import com.unciv.logic.civilization.AlertType
import com.unciv.logic.civilization.Civilization
import com.unciv.logic.civilization.PlayerType
import com.unciv.logic.civilization.diplomacy.DiplomaticStatus
@ -174,8 +173,8 @@ class WorldScreen(
val tileToCenterOn: Vector2 =
when {
viewingCiv.cities.isNotEmpty() && viewingCiv.getCapital() != null -> viewingCiv.getCapital()!!.location
viewingCiv.units.getCivUnits().any() -> viewingCiv.units.getCivUnits().first().getTile().position
viewingCiv.cities.isNotEmpty() && viewingCiv.getCapital() != null -> viewingCiv.getCapital()!!.location
else -> Vector2.Zero
}