From c3f459e254ce083b72308c688d03cefebc64bff3 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Sat, 22 Mar 2025 09:23:09 -0500 Subject: [PATCH] Change logic of restart-game confirmation --- rsrc/dialogs/restart-game.xml | 4 ++-- src/game/boe.actions.cpp | 16 +++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/rsrc/dialogs/restart-game.xml b/rsrc/dialogs/restart-game.xml index e572c220..c6f7d4ae 100644 --- a/rsrc/dialogs/restart-game.xml +++ b/rsrc/dialogs/restart-game.xml @@ -3,8 +3,8 @@ - - Starting over will unload the current party without saving. + + {{action}} will discard any unsaved progress. Are you sure you want to do this? diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index 6a93b70d..31a75d33 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -3504,13 +3504,19 @@ void new_party() { if(recording){ record_action("new_party", ""); } - if(overall_mode != MODE_STARTUP) { - std::string choice = cChoiceDlog("restart-game",{"okay","cancel"}).show(); + if(party_in_memory) { + cChoiceDlog confirm("restart-game",{"okay","cancel"}); + (confirm.operator->())->getControl("warning").replaceText("{{action}}", "Starting over"); + std::string choice = confirm.show(); if(choice == "cancel") return; - for(short i = 0; i < 6; i++) - univ.party[i].main_status = eMainStatus::ABSENT; - party_in_memory = false; + } + + for(short i = 0; i < 6; i++) + univ.party[i].main_status = eMainStatus::ABSENT; + party_in_memory = false; + + if(overall_mode != MODE_STARTUP){ reload_startup(); overall_mode = MODE_STARTUP; draw_startup(0);