Auto-Save every turn again
(even though only every 3rd turn in menu) to help bug reporting
This commit is contained in:
parent
e86d736096
commit
d9ced8c2bb
1 changed files with 10 additions and 8 deletions
|
@ -465,16 +465,18 @@ namespace events{
|
|||
|
||||
void menu_handler::autosave(unsigned turn, const config &starting_pos) const
|
||||
{
|
||||
// We save at the start of every third turn.
|
||||
if (turn % 3 == 1) {
|
||||
config snapshot;
|
||||
write_game_snapshot(snapshot);
|
||||
try {
|
||||
config snapshot;
|
||||
write_game_snapshot(snapshot);
|
||||
try {
|
||||
// We save a "go back to" autosave the start of every third turn.
|
||||
if (turn % 3 == 1) {
|
||||
recorder.save_game(_("Auto-Save") + lexical_cast<std::string>(turn), snapshot, starting_pos);
|
||||
} catch(game::save_game_failed&) {
|
||||
gui::show_dialog(*gui_,NULL,"",_("Could not auto save the game. Please save the game manually."),gui::MESSAGE);
|
||||
//do not bother retrying, since the user can just save the game
|
||||
} else {
|
||||
recorder.save_game(_("Auto-Save"), snapshot, starting_pos);
|
||||
}
|
||||
} catch(game::save_game_failed&) {
|
||||
gui::show_dialog(*gui_,NULL,"",_("Could not auto save the game. Please save the game manually."),gui::MESSAGE);
|
||||
//do not bother retrying, since the user can just save the game
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue