nethack -X vs normal game (trunk only)

Reported to the beta-testers list by <Someone> last April:
restoring a normal game save file in explore mode let you keep the file,
then after exploring and quitting without saving, you could restore it
again in normal mode and take advantage of whatever information you'd
gained.  This makes nethack -X (or playmode:explore) defer the switch to
explore mode when used while restoring a normal mode save file.  It now
performs a normal restore (with save file deletion) and then acts as if
the user had given the 'X' command interactively, requiring confirmation
to actually switch into explore mode.
This commit is contained in:
nethack.rankin
2007-02-17 05:43:18 +00:00
parent 43f72cc357
commit 0ceebfc4b5
7 changed files with 21 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)allmain.c 3.5 2007/01/12 */
/* SCCS Id: @(#)allmain.c 3.5 2007/02/16 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -37,6 +37,11 @@ boolean resuming;
if (wizard) add_debug_extended_commands();
#endif
/* if a save file created in normal mode is now being restored in
explore mode, treat it as normal restore followed by 'X' command
to use up the save file and require confirmation for explore mode */
if (resuming && iflags.deferred_X) (void)enter_explore_mode();
/* side-effects from the real world */
flags.moonphase = phase_of_the_moon();
if(flags.moonphase == FULL_MOON) {