]> granicus.if.org Git - nethack/commitdiff
Add option to have autodescribe on by default
authorPasi Kallinen <paxed@alt.org>
Wed, 16 Dec 2015 19:42:37 +0000 (21:42 +0200)
committerPasi Kallinen <paxed@alt.org>
Wed, 16 Dec 2015 19:42:43 +0000 (21:42 +0200)
dat/opthelp
doc/Guidebook.mn
doc/Guidebook.tex
include/flag.h
src/do_name.c
src/options.c

index cffc7b12ec14b137d14fef432df8f8036dec929b..aae263a39a806309bf9b6e7aa063fb2d38b8cf12 100644 (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]
index 0db6dc0e227f1529c068fd1784d138d40cee0dee..f5b4d48c9a5ab3956ffcc67d78d4cc3018589e85 100644 (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.
index ad025f1a737072e146fd24a8f43f4a62a84ffca9..bd9ba3f6b1e7f0c3f34492a1445c21cd9c8417e6 100644 (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.
index b39a1f0642a2aa411e093b1b873a9a8f4552cf4f..e8d6966624a773766d5f023979f3825230f7e3ed 100644 (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 */
index 9eebe0b514aa574e687f899e35194c6fe01abcd3..3d8669be0462bdc522afce6d39aec0de0274f96c 100644 (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;
index e48194503286af91933a17f2c51d5e29bb2bbf9a..d978ad03375458e2235455652ea39a8b97cc62d2 100644 (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 },