]> granicus.if.org Git - nethack/commitdiff
whatis / quick-whatis for '^'
authorPatR <rankin@nethack.org>
Sun, 30 May 2021 08:31:54 +0000 (01:31 -0700)
committerPatR <rankin@nethack.org>
Sun, 30 May 2021 08:31:54 +0000 (01:31 -0700)
When using '//' or ';' to examine the map and player uses '^' to
move the cursor to the next displayed trap, have cursor go to
locations containing webs, the vibrating square, or other non-'^'
trap when such is the next trap symbol up.  Otherwise looking at
webs is very tedious because '"' is treated as a look-at command
rather than than a target symbol.

doc/fixes37.0
src/do_name.c

index 737b1350c062003a09c75b5e1368fd972ec06cf8..3a8d41c2649b9d84f018bd0d2d8f89a2b503cd53 100644 (file)
@@ -1,4 +1,4 @@
-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.553 $ $NHDT-Date: 1622320390 2021/05/29 20:33:10 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.554 $ $NHDT-Date: 1622363511 2021/05/30 08:31:51 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -534,6 +534,8 @@ make exploding spheres create an actual explosion
 pets are more careful about attacking monsters at low health
 allow killing your quest leader to open the quest
 give King Arthur Excalibur
+when moving the cursor to examine the map, have '^' move to next trap even if
+       that trap is displayed with some other symbol (web, vibrating square)
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 5bf731736f576f3b11f62284fd596c9c6b0b3b2a..64049cde6ae6ebde700809b23a069726de09d96f 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.7 do_name.c       $NHDT-Date: 1614818323 2021/03/04 00:38:43 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.198 $ */
+/* NetHack 3.7 do_name.c       $NHDT-Date: 1622363509 2021/05/30 08:31:49 $  $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.202 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Pasi Kallinen, 2018. */
 /* NetHack may be freely redistributed.  See license for details. */
@@ -884,7 +884,12 @@ getpos(coord *ccp, boolean force, const char *goal)
                         || glyph_to_cmap(k) == S_corr
                         || glyph_to_cmap(k) == S_litcorr)
                         continue;
-                    if (c == defsyms[sidx].sym || c == (int) g.showsyms[sidx])
+                    if (c == defsyms[sidx].sym
+                        || c == (int) g.showsyms[sidx]
+                        /* have '^' match webs and vibrating square or any
+                           other trap that uses something other than '^' */
+                        || (c == '^' && (is_cmap_trap(sidx)
+                                         || sidx == S_vibrating_square)))
                         matching[sidx] = (char) ++k;
                 }
                 if (k) {