Add option to have autodescribe on by default

This commit is contained in:
Pasi Kallinen
2015-12-16 21:42:43 +02:00
parent af6887796f
commit 929be769ec
6 changed files with 15 additions and 6 deletions
+1
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 (You can learn which options exist in your version by checking your current
option setting, which is reached via the 'O' cmd.) 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] autodig dig if moving and wielding digging tool [FALSE]
autoopen walking into a door attempts to open it [TRUE] autoopen walking into a door attempts to open it [TRUE]
autopickup automatically pick up objects you move over [TRUE] autopickup automatically pick up objects you move over [TRUE]
+3
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 If you prefix a `!' or ``no'' to the value, you can
exclude that alignment from being picked randomly. exclude that alignment from being picked randomly.
Cannot be set with the `O' command. Persistent. 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 .lp autodig
Automatically dig if you are wielding a digging tool and moving into a place Automatically dig if you are wielding a digging tool and moving into a place
that can be dug (default false). Persistent. that can be dug (default false). Persistent.
+4
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. exclude that alignment from being picked randomly.
Cannot be set with the `{\tt O}' command. Persistent. Cannot be set with the `{\tt O}' command. Persistent.
%.lp %.lp
\item[\ib{autodescribe}]
Automatically describe the terrain under cursor when asked to get a location
on the map.
%.lp
\item[\ib{autodig}] \item[\ib{autodig}]
Automatically dig if you are wielding a digging tool and moving into a place Automatically dig if you are wielding a digging tool and moving into a place
that can be dug (default false). Persistent. that can be dug (default false). Persistent.
+1
View File
@@ -212,6 +212,7 @@ struct instance_flags {
boolean use_status_hilites; /* use color in status line */ boolean use_status_hilites; /* use color in status line */
boolean use_background_glyph; /* use background glyph when appropriate */ boolean use_background_glyph; /* use background glyph when appropriate */
boolean hilite_pile; /* mark piles of objects with a hilite */ boolean hilite_pile; /* mark piles of objects with a hilite */
boolean autodescribe; /* autodescribe mode in getpos() */
#if 0 #if 0
boolean DECgraphics; /* use DEC VT-xxx extended character set */ boolean DECgraphics; /* use DEC VT-xxx extended character set */
boolean IBMgraphics; /* use IBM extended character set */ boolean IBMgraphics; /* use IBM extended character set */
+5 -6
View File
@@ -80,7 +80,6 @@ const char *goal;
int cx, cy, i, c; int cx, cy, i, c;
int sidx, tx, ty; int sidx, tx, ty;
boolean msg_given = TRUE; /* clear message window by default */ boolean msg_given = TRUE; /* clear message window by default */
boolean auto_msg = FALSE;
boolean show_goal_msg = FALSE; boolean show_goal_msg = FALSE;
static const char pick_chars[] = ".,;:"; static const char pick_chars[] = ".,;:";
const char *cp; const char *cp;
@@ -108,7 +107,7 @@ const char *goal;
curs(WIN_MAP, cx, cy); curs(WIN_MAP, cx, cy);
flush_screen(0); flush_screen(0);
show_goal_msg = FALSE; show_goal_msg = FALSE;
} else if (auto_msg && !msg_given && !hilite_state) { } else if (iflags.autodescribe && !msg_given && !hilite_state) {
coord cc; coord cc;
int sym = 0; int sym = 0;
char tmpbuf[BUFSZ]; char tmpbuf[BUFSZ];
@@ -132,7 +131,7 @@ const char *goal;
flush_screen(0); flush_screen(0);
} }
if (auto_msg) if (iflags.autodescribe)
msg_given = FALSE; msg_given = FALSE;
if (c == '\033') { if (c == '\033') {
@@ -205,11 +204,11 @@ const char *goal;
} }
goto nxtc; goto nxtc;
} else if (c == '#') { } else if (c == '#') {
auto_msg = !auto_msg; iflags.autodescribe = !iflags.autodescribe;
pline("Automatic description %sis %s.", pline("Automatic description %sis %s.",
flags.verbose ? "of features under cursor " : "", flags.verbose ? "of features under cursor " : "",
auto_msg ? "on" : "off"); iflags.autodescribe ? "on" : "off");
if (!auto_msg) if (!iflags.autodescribe)
show_goal_msg = TRUE; show_goal_msg = TRUE;
msg_given = TRUE; msg_given = TRUE;
goto nxtc; goto nxtc;
+1
View File
@@ -75,6 +75,7 @@ static struct Bool_Opt {
#else #else
{ "asksavedisk", (boolean *) 0, FALSE, SET_IN_FILE }, { "asksavedisk", (boolean *) 0, FALSE, SET_IN_FILE },
#endif #endif
{ "autodescribe", &iflags.autodescribe, FALSE, SET_IN_GAME },
{ "autodig", &flags.autodig, FALSE, SET_IN_GAME }, { "autodig", &flags.autodig, FALSE, SET_IN_GAME },
{ "autoopen", &flags.autoopen, TRUE, SET_IN_GAME }, { "autoopen", &flags.autoopen, TRUE, SET_IN_GAME },
{ "autopickup", &flags.pickup, TRUE, SET_IN_GAME }, { "autopickup", &flags.pickup, TRUE, SET_IN_GAME },