implicit_uncursed, mention_walls
Move 'implicit_uncursed' and 'mention_walls' from iflags to flags to make their current setting persist across save/restore. Invalidates existing save files.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.\" $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.346 $ $NHDT-Date: 1578448653 2020/01/08 01:57:33 $
|
||||
.\" $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.347 $ $NHDT-Date: 1579262524 2020/01/17 12:02:04 $
|
||||
.\"
|
||||
.\" This is an excerpt from the 'roff' man page from the 'groff' package.
|
||||
.\" NetHack's Guidebook.mn currently does *not* adhere to these guidelines.
|
||||
@@ -3160,7 +3160,11 @@ Cannot be set with the \(oqO\(cq command.
|
||||
.lp ignintr
|
||||
Ignore interrupt signals, including breaks (default off). Persistent.
|
||||
.lp implicit_uncursed
|
||||
Omit "uncursed" from inventory lists, if possible (default on).
|
||||
Omit \(lquncursed\(rq from object descriptions when it can be deduced from
|
||||
other aspects of the description (default on).
|
||||
Persistent.
|
||||
.lp ""
|
||||
If you use menu coloring, you may want to turn this off.
|
||||
.lp legacy
|
||||
Display an introductory message when starting the game (default on).
|
||||
Persistent.
|
||||
@@ -3180,6 +3184,7 @@ An obsolete synonym for \(lqgender:male\(rq.
|
||||
Cannot be set with the \(oqO\(cq command.
|
||||
.lp mention_walls
|
||||
Give feedback when walking against a wall (default off).
|
||||
Persistent.
|
||||
.lp menucolors
|
||||
Enable coloring menu lines (default off).
|
||||
See \(lqConfiguring Menu Colors\(rq on how to configure the colors.
|
||||
|
||||
@@ -3436,6 +3436,7 @@ Visually distinguish pets from similar animals (default off).
|
||||
The behavior of this option depends on the type of windowing you use.
|
||||
In text windowing, text highlighting or inverse video is often used;
|
||||
with tiles, generally displays a heart symbol near pets.
|
||||
|
||||
%.lp ""
|
||||
With the curses interface, the {\it petattr\/}
|
||||
option controls how to highlight pets and setting it will turn the
|
||||
@@ -3460,7 +3461,12 @@ Only available for TTY and Windows GUI, and only when statushilites is on.
|
||||
Ignore interrupt signals, including breaks (default off). Persistent.
|
||||
%.lp
|
||||
\item[\ib{implicit\verb+_+uncursed}]
|
||||
Omit ``uncursed'' from inventory lists, if possible (default on).
|
||||
Omit ``uncursed'' from object descriptions when it can be deduced from
|
||||
other aspects of the description (default on).
|
||||
Persistent.
|
||||
|
||||
%.lp ""
|
||||
If you use menu coloring, you may want to turn this off.
|
||||
%.lp
|
||||
\item[\ib{legacy}]
|
||||
Display an introductory message when starting the game (default on).
|
||||
@@ -3484,7 +3490,7 @@ An obsolete synonym for ``{\tt gender:male}''. Cannot be set with the
|
||||
`{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{mention\verb+_+walls}]
|
||||
Give feedback when walking against a wall (default off).
|
||||
Give feedback when walking against a wall (default off). Persistent.
|
||||
%.lp
|
||||
\item[\ib{menucolors}]
|
||||
Enable coloring menu lines (default off).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.68 $ $NHDT-Date: 1579257808 2020/01/17 10:43:28 $
|
||||
$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.69 $ $NHDT-Date: 1579261284 2020/01/17 11:41:24 $
|
||||
|
||||
General Fixes and Modified Features
|
||||
-----------------------------------
|
||||
@@ -114,6 +114,8 @@ tiny chance for randomly created spellbooks to be Discworld novels instead
|
||||
of having only one in the first book or scroll shop created (won't
|
||||
occur in hero's initial inventory or NPC priest inventory or be
|
||||
bestowed as a prayer boon or be found in statues)
|
||||
'goldX', 'implicit_uncursed', and 'mention_walls' options changed to be
|
||||
persistent across save/restore
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 flag.h $NHDT-Date: 1577050470 2019/12/22 21:34:30 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.167 $ */
|
||||
/* NetHack 3.7 flag.h $NHDT-Date: 1579261284 2020/01/17 11:41:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.172 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2006. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -36,10 +36,12 @@ struct flag {
|
||||
boolean goldX; /* for BUCX filtering, whether gold is X or U */
|
||||
boolean help; /* look in data file for info about stuff */
|
||||
boolean ignintr; /* ignore interrupts */
|
||||
boolean implicit_uncursed; /* maybe omit "uncursed" status in inventory */
|
||||
boolean ins_chkpt; /* checkpoint as appropriate; INSURANCE */
|
||||
boolean invlet_constant; /* let objects keep their inventory symbol */
|
||||
boolean legacy; /* print game entry "story" */
|
||||
boolean lit_corridor; /* show a dark corr as lit if it is in sight */
|
||||
boolean mention_walls; /* give feedback when bumping walls */
|
||||
boolean nap; /* `timed_delay' option for display effects */
|
||||
boolean null; /* OK to send nulls to the terminal */
|
||||
boolean pickup; /* whether you pickup or move and look */
|
||||
@@ -258,8 +260,6 @@ struct instance_flags {
|
||||
boolean echo; /* 1 to echo characters */
|
||||
boolean force_invmenu; /* always menu when handling inventory */
|
||||
boolean hilite_pile; /* mark piles of objects with a hilite */
|
||||
boolean implicit_uncursed; /* maybe omit "uncursed" status in inventory */
|
||||
boolean mention_walls; /* give feedback when bumping walls */
|
||||
boolean menu_head_objsym; /* Show obj symbol in menu headings */
|
||||
boolean menu_overlay; /* Draw menus over the map */
|
||||
boolean menu_requested; /* Flag for overloaded use of 'm' prefix
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 patchlevel.h $NHDT-Date: 1577050471 2019/12/22 21:34:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.142 $ */
|
||||
/* NetHack 3.7 patchlevel.h $NHDT-Date: 1579261287 2020/01/17 11:41:27 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.148 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -14,7 +14,7 @@
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 9
|
||||
#define EDITLEVEL 10
|
||||
|
||||
#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2020"
|
||||
#define COPYRIGHT_BANNER_B \
|
||||
|
||||
28
src/hack.c
28
src/hack.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 hack.c $NHDT-Date: 1579257808 2020/01/17 10:43:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.244 $ */
|
||||
/* NetHack 3.6 hack.c $NHDT-Date: 1579261288 2020/01/17 11:41:28 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.245 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -750,7 +750,7 @@ int mode;
|
||||
return FALSE;
|
||||
}
|
||||
if (!(Passes_walls || passes_bars(g.youmonst.data))) {
|
||||
if (mode == DO_MOVE && iflags.mention_walls)
|
||||
if (mode == DO_MOVE && flags.mention_walls)
|
||||
You("cannot pass through the bars.");
|
||||
return FALSE;
|
||||
}
|
||||
@@ -772,7 +772,7 @@ int mode;
|
||||
else if (Passes_walls && !may_passwall(x, y)
|
||||
&& In_sokoban(&u.uz))
|
||||
pline_The("Sokoban walls resist your ability.");
|
||||
else if (iflags.mention_walls)
|
||||
else if (flags.mention_walls)
|
||||
pline("It's %s.",
|
||||
(IS_WALL(tmpr->typ) || tmpr->typ == SDOOR) ? "a wall"
|
||||
: IS_TREE(tmpr->typ) ? "a tree"
|
||||
@@ -842,7 +842,7 @@ int mode;
|
||||
if (mode == DO_MOVE) {
|
||||
if (Blind)
|
||||
feel_location(x, y);
|
||||
if (Underwater || iflags.mention_walls)
|
||||
if (Underwater || flags.mention_walls)
|
||||
You_cant("move diagonally into an intact doorway.");
|
||||
}
|
||||
return FALSE;
|
||||
@@ -896,7 +896,7 @@ int mode;
|
||||
if (dx && dy && !Passes_walls && IS_DOOR(ust->typ)
|
||||
&& (!doorless_door(ux, uy) || block_entry(x, y))) {
|
||||
/* Can't move at a diagonal out of a doorway with door. */
|
||||
if (mode == DO_MOVE && iflags.mention_walls)
|
||||
if (mode == DO_MOVE && flags.mention_walls)
|
||||
You_cant("move diagonally out of an intact doorway.");
|
||||
return FALSE;
|
||||
}
|
||||
@@ -904,7 +904,7 @@ int mode;
|
||||
if (sobj_at(BOULDER, x, y) && (Sokoban || !Passes_walls)) {
|
||||
if (!(Blind || Hallucination) && (g.context.run >= 2)
|
||||
&& mode != TEST_TRAV) {
|
||||
if (mode == DO_MOVE && iflags.mention_walls)
|
||||
if (mode == DO_MOVE && flags.mention_walls)
|
||||
pline("A boulder blocks your path.");
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1495,7 +1495,7 @@ domove_core()
|
||||
}
|
||||
}
|
||||
if (!isok(x, y)) {
|
||||
if (iflags.mention_walls) {
|
||||
if (flags.mention_walls) {
|
||||
int dx = u.dx, dy = u.dy;
|
||||
|
||||
if (dx && dy) { /* diagonal */
|
||||
@@ -1518,7 +1518,7 @@ domove_core()
|
||||
|| (Blind && !Levitation && !Flying && !is_clinger(g.youmonst.data)
|
||||
&& is_pool_or_lava(x, y) && levl[x][y].seenv)) {
|
||||
if (g.context.run >= 2) {
|
||||
if (iflags.mention_walls) {
|
||||
if (flags.mention_walls) {
|
||||
if (trap && trap->tseen) {
|
||||
You("stop in front of %s.",
|
||||
an(trapname(trap->ttyp, FALSE)));
|
||||
@@ -2729,7 +2729,7 @@ lookaround()
|
||||
if ((g.context.run != 1 && !mtmp->mtame)
|
||||
|| (x == u.ux + u.dx && y == u.uy + u.dy
|
||||
&& !g.context.travel)) {
|
||||
if (iflags.mention_walls)
|
||||
if (flags.mention_walls)
|
||||
pline("%s blocks your path.", upstart(a_monnam(mtmp)));
|
||||
goto stop;
|
||||
}
|
||||
@@ -2747,7 +2747,7 @@ lookaround()
|
||||
if (x != u.ux && y != u.uy)
|
||||
continue;
|
||||
if (g.context.run != 1) {
|
||||
if (iflags.mention_walls)
|
||||
if (flags.mention_walls)
|
||||
You("stop in front of the door.");
|
||||
goto stop;
|
||||
}
|
||||
@@ -2776,11 +2776,9 @@ lookaround()
|
||||
if (g.context.run == 1)
|
||||
goto bcorr; /* if you must */
|
||||
if (x == u.ux + u.dx && y == u.uy + u.dy) {
|
||||
if (iflags.mention_walls) {
|
||||
|
||||
if (flags.mention_walls)
|
||||
You("stop in front of %s.",
|
||||
an(trapname(trap->ttyp, FALSE)));
|
||||
}
|
||||
goto stop;
|
||||
}
|
||||
continue;
|
||||
@@ -2794,7 +2792,7 @@ lookaround()
|
||||
* to test boots by trying to SHIFT-direction
|
||||
* into a pool and seeing if the game allowed it
|
||||
*/
|
||||
if (iflags.mention_walls)
|
||||
if (flags.mention_walls)
|
||||
You("stop at the edge of the %s.",
|
||||
hliquid(is_pool(x,y) ? "water" : "lava"));
|
||||
goto stop;
|
||||
@@ -2817,7 +2815,7 @@ lookaround()
|
||||
} /* end for loops */
|
||||
|
||||
if (corrct > 1 && g.context.run == 2) {
|
||||
if (iflags.mention_walls)
|
||||
if (flags.mention_walls)
|
||||
pline_The("corridor widens here.");
|
||||
goto stop;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 objnam.c $NHDT-Date: 1578896203 2020/01/13 06:16:43 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.287 $ */
|
||||
/* NetHack 3.7 objnam.c $NHDT-Date: 1579261291 2020/01/17 11:41:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.288 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -998,7 +998,7 @@ unsigned doname_flags;
|
||||
Strcat(prefix, "cursed ");
|
||||
else if (obj->blessed)
|
||||
Strcat(prefix, "blessed ");
|
||||
else if (!iflags.implicit_uncursed
|
||||
else if (!flags.implicit_uncursed
|
||||
/* For most items with charges or +/-, if you know how many
|
||||
* charges are left or what the +/- is, then you must have
|
||||
* totally identified the item, so "uncursed" is unnecessary,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 options.c $NHDT-Date: 1577050473 2019/12/22 21:34:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.422 $ */
|
||||
/* NetHack 3.7 options.c $NHDT-Date: 1579261293 2020/01/17 11:41:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.428 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2008. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -146,7 +146,7 @@ static const struct Bool_Opt {
|
||||
#else
|
||||
{ "ignintr", (boolean *) 0, FALSE, SET_IN_FILE },
|
||||
#endif
|
||||
{ "implicit_uncursed", &iflags.implicit_uncursed, TRUE, SET_IN_GAME },
|
||||
{ "implicit_uncursed", &flags.implicit_uncursed, TRUE, SET_IN_GAME },
|
||||
{ "large_font", &iflags.obsolete, FALSE, SET_IN_FILE }, /* OBSOLETE */
|
||||
{ "legacy", &flags.legacy, TRUE, DISP_IN_GAME },
|
||||
{ "lit_corridor", &flags.lit_corridor, FALSE, SET_IN_GAME },
|
||||
@@ -156,7 +156,7 @@ static const struct Bool_Opt {
|
||||
#else
|
||||
{ "mail", (boolean *) 0, TRUE, SET_IN_FILE },
|
||||
#endif
|
||||
{ "mention_walls", &iflags.mention_walls, FALSE, SET_IN_GAME },
|
||||
{ "mention_walls", &flags.mention_walls, FALSE, SET_IN_GAME },
|
||||
{ "menucolors", &iflags.use_menu_color, FALSE, SET_IN_GAME },
|
||||
/* for menu debugging only*/
|
||||
{ "menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_WIZGAME },
|
||||
@@ -4052,7 +4052,7 @@ boolean tinitial, tfrom_file;
|
||||
g.context.botl = TRUE;
|
||||
} else if (boolopt[i].addr == &flags.invlet_constant
|
||||
|| boolopt[i].addr == &flags.sortpack
|
||||
|| boolopt[i].addr == &iflags.implicit_uncursed) {
|
||||
|| boolopt[i].addr == &flags.implicit_uncursed) {
|
||||
if (!flags.invlet_constant)
|
||||
reassign();
|
||||
update_inventory();
|
||||
|
||||
Reference in New Issue
Block a user