diff --git a/buildSrc/src/main/kotlin/BuildConfig.kt b/buildSrc/src/main/kotlin/BuildConfig.kt index 0a8ab245..50954f37 100644 --- a/buildSrc/src/main/kotlin/BuildConfig.kt +++ b/buildSrc/src/main/kotlin/BuildConfig.kt @@ -3,8 +3,8 @@ package com.unciv.build object BuildConfig { const val kotlinVersion = "1.3.71" const val appName = "Unciv" - const val appCodeNumber = 455 - const val appVersion = "3.9.17-patch1" + const val appCodeNumber = 456 + const val appVersion = "3.9.17-patch2" const val gdxVersion = "1.9.10" const val roboVMVersion = "2.3.1" diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt index c944a7b6..5f93c295 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt @@ -174,13 +174,14 @@ object UnitActions { private fun addPillageAction(unit: MapUnit, actionList: ArrayList, worldScreen: WorldScreen) { val pillageAction = getPillageAction(unit) if (pillageAction == null) return - val pillageWithConfirmationAction = UnitAction(type = UnitActionType.Pillage, action = { + if(pillageAction.action==null) + actionList += UnitAction(UnitActionType.Pillage, action = null) + else actionList += UnitAction(type = UnitActionType.Pillage) { if (!worldScreen.hasOpenPopups()) { val pillageText = "Are you sure you want to pillage this [${unit.currentTile.improvement}]?" - YesNoPopup(pillageText, { pillageAction.action!!(); worldScreen.shouldUpdate = true }).open() + YesNoPopup(pillageText, { (pillageAction.action)(); worldScreen.shouldUpdate = true }).open() } - }) - actionList += pillageWithConfirmationAction + } } fun getPillageAction(unit: MapUnit): UnitAction? {