Skip to content

Commit

Permalink
Remove quit query option and remove queries from menu and save quitting
Browse files Browse the repository at this point in the history
  • Loading branch information
Procyonae committed Dec 11, 2024
1 parent 798244d commit 36eea17
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
3 changes: 1 addition & 2 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2855,8 +2855,7 @@ bool game::query_exit_to_OS()
const int old_timeout = inp_mngr.get_timeout();
inp_mngr.reset_timeout();
uquit = QUIT_EXIT_PENDING; // change it before query so input_context doesn't get confused
if( !get_option<bool>( "QUERY_QUIT" ) ||
query_yn( _( "Really Quit? All unsaved changes will be lost." ) ) ) {
if( query_yn( _( "Really Quit? All unsaved changes will be lost." ) ) ) {
uquit = QUIT_EXIT;
throw exit_exception();
}
Expand Down
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( !get_option<bool>( "QUERY_QUIT" ) || 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( !get_option<bool>( "QUERY_QUIT" ) || 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
5 changes: 0 additions & 5 deletions src/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1926,11 +1926,6 @@ void options_manager::add_options_interface()
true
);

add( "QUERY_QUIT", page_id, to_translation( "Query on quit" ),
to_translation( "If true, will query before before quitting the game." ),
true
);

add( "CLOSE_ADV_INV", page_id, to_translation( "Close advanced inventory on move all" ),
to_translation( "If true, will close the advanced inventory when the move all items command is used." ),
false
Expand Down

0 comments on commit 36eea17

Please sign in to comment.