From 697ff92fea8e0a7f9a3ce639eecc2f1a7d8b0325 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 3 Aug 2020 23:30:02 +0300 Subject: [PATCH] 3.9.17-patch2 --- buildSrc/src/main/kotlin/BuildConfig.kt | 4 ++-- core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) 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? {