diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 1994bd8445..e5ec176376 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -656,6 +656,7 @@ Show unit movement arrows = Continuous rendering = When disabled, saves battery life but certain animations will be suspended = Order trade offers by amount = +Ask for confirmation when pressing next turn = Check extension mods based on: = -none- = Reload mods = @@ -808,6 +809,7 @@ Waiting for other players... = Waiting for [civName]... = in = Next turn = +Confirm next turn = Move automated units = [currentPlayerCiv] ready? = 1 turn = diff --git a/core/src/com/unciv/models/metadata/GameSettings.kt b/core/src/com/unciv/models/metadata/GameSettings.kt index 39b623dcdc..132153f319 100644 --- a/core/src/com/unciv/models/metadata/GameSettings.kt +++ b/core/src/com/unciv/models/metadata/GameSettings.kt @@ -48,6 +48,7 @@ class GameSettings { var multiplayerTurnCheckerPersistentNotificationEnabled = true var multiplayerTurnCheckerDelayInMinutes = 5 var orderTradeOffersByAmount = true + var confirmNextTurn = false var windowState = WindowState() var isFreshlyCreated = false var visualMods = HashSet() diff --git a/core/src/com/unciv/ui/options/GameplayTab.kt b/core/src/com/unciv/ui/options/GameplayTab.kt index 648ada5203..fbd9c597d9 100644 --- a/core/src/com/unciv/ui/options/GameplayTab.kt +++ b/core/src/com/unciv/ui/options/GameplayTab.kt @@ -33,4 +33,5 @@ fun gameplayTab( settings.automatedWorkersReplaceImprovements ) { settings.automatedWorkersReplaceImprovements = it } optionsPopup.addCheckbox(this, "Order trade offers by amount", settings.orderTradeOffersByAmount) { settings.orderTradeOffersByAmount = it } -} \ No newline at end of file + optionsPopup.addCheckbox(this, "Ask for confirmation when pressing next turn", settings.confirmNextTurn) { settings.confirmNextTurn = it } +} diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index 10fa7bdc05..bb19dbe6bb 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -39,6 +39,7 @@ import com.unciv.ui.pickerscreens.* import com.unciv.ui.popup.ExitGamePopup import com.unciv.ui.popup.Popup import com.unciv.ui.popup.ToastPopup +import com.unciv.ui.popup.YesNoPopup import com.unciv.ui.popup.hasOpenPopups import com.unciv.ui.saves.LoadGameScreen import com.unciv.ui.saves.SaveGameScreen @@ -822,8 +823,15 @@ class WorldScreen(val gameInfo: GameInfo, val viewingCiv:CivilizationInfo) : Bas else -> NextTurnAction("${Fonts.turn}{Next turn}", Color.WHITE) { - game.settings.addCompletedTutorialTask("Pass a turn") - nextTurn() + val action = { + game.settings.addCompletedTutorialTask("Pass a turn") + nextTurn() + } + if (game.settings.confirmNextTurn) { + YesNoPopup("Confirm next turn", action, this).open() + } else { + action() + } } } }