Add option to have autodescribe on by default

This commit is contained in:
Pasi Kallinen
2015-12-16 21:42:37 +02:00
parent af6887796f
commit 929be769ec
6 changed files with 15 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ Boolean options not under specific compile flags (with default values in []):
(You can learn which options exist in your version by checking your current
option setting, which is reached via the 'O' cmd.)
autodescribe describe the terrain under cursor [FALSE]
autodig dig if moving and wielding digging tool [FALSE]
autoopen walking into a door attempts to open it [TRUE]
autopickup automatically pick up objects you move over [TRUE]

View File

@@ -1970,6 +1970,9 @@ The default is to randomly pick an appropriate alignment.
If you prefix a `!' or ``no'' to the value, you can
exclude that alignment from being picked randomly.
Cannot be set with the `O' command. Persistent.
.lp autodescribe
Automatically describe the terrain under cursor when asked to get a location
on the map.
.lp autodig
Automatically dig if you are wielding a digging tool and moving into a place
that can be dug (default false). Persistent.

View File

@@ -2377,6 +2377,10 @@ If you prefix `{\tt !}' or ``{\tt no}'' to the value, you can
exclude that alignment from being picked randomly.
Cannot be set with the `{\tt O}' command. Persistent.
%.lp
\item[\ib{autodescribe}]
Automatically describe the terrain under cursor when asked to get a location
on the map.
%.lp
\item[\ib{autodig}]
Automatically dig if you are wielding a digging tool and moving into a place
that can be dug (default false). Persistent.

View File

@@ -212,6 +212,7 @@ struct instance_flags {
boolean use_status_hilites; /* use color in status line */
boolean use_background_glyph; /* use background glyph when appropriate */
boolean hilite_pile; /* mark piles of objects with a hilite */
boolean autodescribe; /* autodescribe mode in getpos() */
#if 0
boolean DECgraphics; /* use DEC VT-xxx extended character set */
boolean IBMgraphics; /* use IBM extended character set */

View File

@@ -80,7 +80,6 @@ const char *goal;
int cx, cy, i, c;
int sidx, tx, ty;
boolean msg_given = TRUE; /* clear message window by default */
boolean auto_msg = FALSE;
boolean show_goal_msg = FALSE;
static const char pick_chars[] = ".,;:";
const char *cp;
@@ -108,7 +107,7 @@ const char *goal;
curs(WIN_MAP, cx, cy);
flush_screen(0);
show_goal_msg = FALSE;
} else if (auto_msg && !msg_given && !hilite_state) {
} else if (iflags.autodescribe && !msg_given && !hilite_state) {
coord cc;
int sym = 0;
char tmpbuf[BUFSZ];
@@ -132,7 +131,7 @@ const char *goal;
flush_screen(0);
}
if (auto_msg)
if (iflags.autodescribe)
msg_given = FALSE;
if (c == '\033') {
@@ -205,11 +204,11 @@ const char *goal;
}
goto nxtc;
} else if (c == '#') {
auto_msg = !auto_msg;
iflags.autodescribe = !iflags.autodescribe;
pline("Automatic description %sis %s.",
flags.verbose ? "of features under cursor " : "",
auto_msg ? "on" : "off");
if (!auto_msg)
iflags.autodescribe ? "on" : "off");
if (!iflags.autodescribe)
show_goal_msg = TRUE;
msg_given = TRUE;
goto nxtc;

View File

@@ -75,6 +75,7 @@ static struct Bool_Opt {
#else
{ "asksavedisk", (boolean *) 0, FALSE, SET_IN_FILE },
#endif
{ "autodescribe", &iflags.autodescribe, FALSE, SET_IN_GAME },
{ "autodig", &flags.autodig, FALSE, SET_IN_GAME },
{ "autoopen", &flags.autoopen, TRUE, SET_IN_GAME },
{ "autopickup", &flags.pickup, TRUE, SET_IN_GAME },