From 83270ddf8fc8bda2b4167bda4416e281b206c677 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 28 Jun 2023 19:08:52 +0300 Subject: [PATCH] Resolved #9689 - no city window on citybutton click --- buildSrc/src/main/kotlin/BuildConfig.kt | 4 ++-- core/src/com/unciv/UncivGame.kt | 2 +- .../unciv/ui/screens/worldscreen/status/NextTurnButton.kt | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/buildSrc/src/main/kotlin/BuildConfig.kt b/buildSrc/src/main/kotlin/BuildConfig.kt index 2b089c010c..d98f4f428c 100644 --- a/buildSrc/src/main/kotlin/BuildConfig.kt +++ b/buildSrc/src/main/kotlin/BuildConfig.kt @@ -4,8 +4,8 @@ package com.unciv.build object BuildConfig { const val kotlinVersion = "1.8.21" const val appName = "Unciv" - const val appCodeNumber = 884 - const val appVersion = "4.7.5" + const val appCodeNumber = 885 + const val appVersion = "4.7.5-patch1" const val gdxVersion = "1.11.0" const val ktorVersion = "2.2.3" diff --git a/core/src/com/unciv/UncivGame.kt b/core/src/com/unciv/UncivGame.kt index 04ff92d576..630115d144 100644 --- a/core/src/com/unciv/UncivGame.kt +++ b/core/src/com/unciv/UncivGame.kt @@ -536,7 +536,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci companion object { //region AUTOMATICALLY GENERATED VERSION DATA - DO NOT CHANGE THIS REGION, INCLUDING THIS COMMENT - val VERSION = Version("4.7.5", 884) + val VERSION = Version("4.7.5-patch1", 885) //endregion lateinit var Current: UncivGame diff --git a/core/src/com/unciv/ui/screens/worldscreen/status/NextTurnButton.kt b/core/src/com/unciv/ui/screens/worldscreen/status/NextTurnButton.kt index 9ddc97343f..de3e5dbfea 100644 --- a/core/src/com/unciv/ui/screens/worldscreen/status/NextTurnButton.kt +++ b/core/src/com/unciv/ui/screens/worldscreen/status/NextTurnButton.kt @@ -162,8 +162,11 @@ class NextTurnButton : IconTextButton("", null, 30) { .any { it.currentMovement > Constants.minimumMovementEpsilon && (it.isMoving() || it.isAutomated() || it.isExploring()) } -> NextTurnAction("Move automated units", Color.LIGHT_GRAY, "NotificationIcons/MoveAutomatedUnits") { - worldScreen.viewingCiv.hasMovedAutomatedUnits = true + // Don't allow double-click of 'n' to spawn 2 processes trying to automate units + if (!worldScreen.isPlayersTurn) return@NextTurnAction + worldScreen.isPlayersTurn = false // Disable state changes + worldScreen.viewingCiv.hasMovedAutomatedUnits = true worldScreen.nextTurnButton.disable() Concurrency.run("Move automated units") { for (unit in worldScreen.viewingCiv.units.getCivUnits())