From d12fd43d156a43d2b8878f942784b8e30511cb7f Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sun, 29 Dec 2019 13:09:55 -0500 Subject: [PATCH] Fix the save action - Prompt for filename if the game has never been saved - Don't say the game was saved if file choice was cancelled (affects save as too) --- src/game/boe.actions.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index 6d428b23..8d3a0f65 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -2228,13 +2228,16 @@ void do_save(short mode) { return; } fs::path file = univ.file; - if(mode == 1) file = nav_put_party(file); + if(mode == 1 || file.empty()) + file = nav_put_party(file); + bool saved = false; if(!file.empty()) { univ.file = file; - save_party(univ.file, univ); + saved = save_party(univ.file, univ); } - add_string_to_buf("Save: Game saved"); + if(saved) + add_string_to_buf("Save: Game saved"); pause(6); redraw_screen(REFRESH_TEXT);