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)
This commit is contained in:
@@ -2228,13 +2228,16 @@ void do_save(short mode) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fs::path file = univ.file;
|
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()) {
|
if(!file.empty()) {
|
||||||
univ.file = file;
|
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);
|
pause(6);
|
||||||
redraw_screen(REFRESH_TEXT);
|
redraw_screen(REFRESH_TEXT);
|
||||||
|
Reference in New Issue
Block a user