pickup still accepts m as command prefix, but now rejects F,g,G,M,numpad 5
scatter piles of kicked gold rather than move the entire pile at once
#jump attempt fails if mounted on sleeping steed; jumping spell still works
+if normal game save file is restored via `nethack -X', restore in normal
+ mode--with save file deletion--and require confirmation ala 'X'
+ command to make deferred switch into explore mode
Platform- and/or Interface-Specific Fixes
E int NDECL(doprev_message);
E int NDECL(timed_occupation);
E int NDECL(doattributes);
-E int NDECL(enter_explore_mode);
# ifdef WIZARD
E int NDECL(wiz_detect);
E int NDECL(wiz_genesis);
E void FDECL(rhack, (char *));
E int NDECL(doextlist);
E int NDECL(extcmd_via_menu);
+E int NDECL(enter_explore_mode);
E void FDECL(enlightenment, (int));
E void FDECL(show_conduct, (int));
E int FDECL(xytod, (SCHAR_P,SCHAR_P));
-/* SCCS Id: @(#)flag.h 3.5 2005/11/19 */
+/* SCCS Id: @(#)flag.h 3.5 2007/02/16 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
int *opt_booldup; /* for duplication of boolean opts in config file */
int *opt_compdup; /* for duplication of compound opts in config file */
boolean cbreak; /* in cbreak mode, rogue format */
+ boolean deferred_X; /* deferred entry into explore mode */
boolean num_pad; /* use numbers for movement commands */
boolean news; /* print news */
boolean menu_tab_sep; /* Use tabs to separate option menu fields */
-/* 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. */
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) {
extern int NDECL(dorub); /**/
extern int NDECL(dojump); /**/
extern int NDECL(doextlist); /**/
+extern int NDECL(enter_explore_mode); /**/
extern int NDECL(dodrop); /**/
extern int NDECL(doddrop); /**/
extern int NDECL(dodown); /**/
STATIC_PTR int NDECL(wiz_rumor_check);
STATIC_DCL char FDECL(cmd_from_func, (int NDECL((*))));
# endif /* WIZARD */
-STATIC_PTR int NDECL(enter_explore_mode);
STATIC_PTR int NDECL(doattributes);
STATIC_PTR int NDECL(doconduct); /**/
STATIC_PTR boolean NDECL(minimal_enlightenment);
return 0;
}
-STATIC_PTR int
+int
enter_explore_mode(VOID_ARGS)
{
if(!discover && !wizard) {
wizard = FALSE; /* not allowed or not available */
/* force explore mode if we didn't make it into wizard mode */
discover = !wizard;
+ iflags.deferred_X = FALSE;
}
/* don't need to do anything special for explore mode or normal play */
}
newgameflags = flags;
mread(fd, (genericptr_t) &flags, sizeof(struct flag));
/* wizard and discover are actually flags.debug and flags.explore;
- player might be overriding the save file values for them */
- if (newgameflags.explore) discover = TRUE;
+ player might be overriding the save file values for them;
+ in the discover case, we don't want to set that for a normal
+ game until after the save file has been removed */
+ iflags.deferred_X = (newgameflags.explore && !discover);
if (newgameflags.debug) {
/* authorized by startup code; wizard mode exists and is allowed */
- wizard = TRUE, discover = FALSE;
+ wizard = TRUE, discover = iflags.deferred_X = FALSE;
} else if (wizard) {
/* specified by save file; check authorization now */
set_playmode();
u.uz.dnum = 0;
u.uz.dlevel = 1;
/* revert to pre-restore option settings */
+ iflags.deferred_X = FALSE;
flags = newgameflags;
#ifdef SYSFLAGS
sysflags = newgamesysflags;