whatis / quick-whatis for '^'

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.
This commit is contained in:
PatR
2021-05-30 01:31:54 -07:00
parent 0fda8504bb
commit 494b374e12
2 changed files with 10 additions and 3 deletions

View 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) {