Skip to content

Commit

Permalink
Merge pull request #78379 from Procyonae/DebugOptionRemoveQuitQuery
Browse files Browse the repository at this point in the history
Remove y/n prompts for save quitting and quitting from the main menu
  • Loading branch information
Maleclypse authored Dec 14, 2024
2 parents 45999cb + f464be9 commit 852bc73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
8 changes: 3 additions & 5 deletions src/handle_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2820,11 +2820,9 @@ bool game::do_regular_action( action_id &act, avatar &player_character,
break;

case ACTION_SAVE:
if( query_yn( _( "Save and quit?" ) ) ) {
if( save() ) {
player_character.set_moves( 0 );
uquit = QUIT_SAVED;
}
if( save() ) {
player_character.set_moves( 0 );
uquit = QUIT_SAVED;
}
break;

Expand Down
8 changes: 2 additions & 6 deletions src/main_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -884,12 +884,8 @@ bool main_menu::opening_screen()
// also check special keys
if( action == "QUIT" ) {
#if !defined(EMSCRIPTEN)
g->uquit = QUIT_EXIT_PENDING;
if( query_yn( _( "Really quit?" ) ) ) {
g->uquit = QUIT_EXIT;
return false;
}
g->uquit = QUIT_NO;
g->uquit = QUIT_EXIT;
return false;
#endif
} else if( action == "LEFT" || action == "PREV_TAB" || action == "RIGHT" || action == "NEXT_TAB" ) {
sel_line = 0;
Expand Down

0 comments on commit 852bc73

Please sign in to comment.