diff --git a/android/assets/jsons/Translations/Diplomacy,Trade,Nations.json b/android/assets/jsons/Translations/Diplomacy,Trade,Nations.json index 497100b440..558346e4d4 100644 --- a/android/assets/jsons/Translations/Diplomacy,Trade,Nations.json +++ b/android/assets/jsons/Translations/Diplomacy,Trade,Nations.json @@ -343,7 +343,7 @@ French:"Votre soi-disant 'amitié' ne vaut rien." } - "You have publically denounced us!":{ + "You have publicly denounced us!":{ Italian:"Ci hai denunciato pubblicamente di fronte al mondo!" French:"Vous nous avez dénoncé publiquement!" } diff --git a/core/src/com/unciv/logic/automation/UnitAutomation.kt b/core/src/com/unciv/logic/automation/UnitAutomation.kt index c6479b8bbc..44efdc1fba 100644 --- a/core/src/com/unciv/logic/automation/UnitAutomation.kt +++ b/core/src/com/unciv/logic/automation/UnitAutomation.kt @@ -116,7 +116,7 @@ class UnitAutomation{ fun tryPillageImprovement(unit: MapUnit, unitDistanceToTiles: HashMap) : Boolean { if(unit.type.isCivilian()) return false val tilesInDistance = unitDistanceToTiles.filter {it.value < unit.currentMovement}.keys - .filter { unit.canMoveTo(it) && it.improvement != null && UnitActions().canPillage(unit,it) } + .filter { unit.canMoveTo(it) && UnitActions().canPillage(unit,it) } if (tilesInDistance.isEmpty()) return false val tileToPillage = tilesInDistance.maxBy { it.getDefensiveBonus() }!! diff --git a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt index 1850715592..7d52e4f553 100644 --- a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt @@ -19,6 +19,7 @@ import com.unciv.logic.trade.TradeType import com.unciv.models.gamebasics.tr import com.unciv.ui.utils.* import com.unciv.ui.worldscreen.optionstable.YesNoPopupTable +import kotlin.math.roundToInt class DiplomacyScreen:CameraStageBaseScreen() { @@ -38,6 +39,9 @@ class DiplomacyScreen:CameraStageBaseScreen() { val closeButton = TextButton("Close".tr(), skin) closeButton.onClick { UnCivGame.Current.setWorldScreen() } + closeButton.label.setFontSize(24) + closeButton.labelCell.pad(10f) + closeButton.pack() closeButton.y = stage.height - closeButton.height - 10 closeButton.x = 10f stage.addActor(closeButton) // This must come after the split pane so it will be above, that the button will be clickable @@ -240,13 +244,14 @@ class DiplomacyScreen:CameraStageBaseScreen() { DeclaredFriendshipWithOurAllies -> "You have declared friendship with our allies" OpenBorders -> "Our open borders have brought us closer together." BetrayedDeclarationOfFriendship -> "Your so-called 'friendship' is worth nothing." - Denunciation -> "You have publically denounced us!" + Denunciation -> "You have publicly denounced us!" DenouncedOurAllies -> "You have denounced our allies" DenouncedOurEnemies -> "You have denounced our enemies" + BetrayedPromiseToNotSettleCitiesNearUs -> "You betrayed your promise to not settle cities near us" } text = text.tr() + " " if (modifier.value > 0) text += "+" - text += modifier.value.toInt() + text += modifier.value.roundToInt() val color = if (modifier.value < 0) Color.RED else Color.GREEN diplomacyModifiersTable.add(text.toLabel().setFontColor(color)).row() } diff --git a/core/src/com/unciv/ui/worldscreen/AlertPopup.kt b/core/src/com/unciv/ui/worldscreen/AlertPopup.kt index b6f17b8fab..5be88925e5 100644 --- a/core/src/com/unciv/ui/worldscreen/AlertPopup.kt +++ b/core/src/com/unciv/ui/worldscreen/AlertPopup.kt @@ -14,7 +14,7 @@ import com.unciv.ui.worldscreen.optionstable.PopupTable class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): PopupTable(worldScreen){ fun getCloseButton(text:String): TextButton { val button = TextButton(text.tr(), skin) - button.onClick { close() } + button.onClick { close(); worldScreen.shouldUpdate=true } return button } diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index f6d0c45191..81ba4b6c18 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -142,7 +142,6 @@ class WorldScreen : CameraStageBaseScreen() { updateTechButton(cloneCivilization) updateDiplomacyButton(cloneCivilization) - updateNextTurnButton() bottomBar.update(tileMapHolder.selectedTile) // has to come before tilemapholder update because the tilemapholder actions depend on the selected unit! battleTable.update() @@ -174,6 +173,7 @@ class WorldScreen : CameraStageBaseScreen() { && currentPlayerCiv.popupAlerts.any() && !AlertPopup.isOpen -> AlertPopup(this,currentPlayerCiv.popupAlerts.first()) } + updateNextTurnButton() } private fun updateDiplomacyButton(civInfo: CivilizationInfo) { @@ -300,6 +300,8 @@ class WorldScreen : CameraStageBaseScreen() { nextTurnButton.setText(text.tr()) nextTurnButton.color = if(text=="Next turn") Color.WHITE else Color.GRAY nextTurnButton.pack() + if(AlertPopup.isOpen) nextTurnButton.disable() + else nextTurnButton.enable() nextTurnButton.setPosition(stage.width - nextTurnButton.width - 10f, topBar.y - nextTurnButton.height - 10f) }