better feedback for '& m' and '? f m'

For the description of what a keystroke does, augment 'm' (or whatever
key has been bound to #reqmenu) to replace the default description
|m      prefix: request menu or modify command (#reqmenu).
with
|m      movement prefix: move without autopickup and without attacking
|m      non-movement prefix: request menu or modify command (#reqmenu).

The text is delivered by pline so tty will issue --More-- between the
two lines.
This commit is contained in:
PatR
2022-06-13 04:41:31 -07:00
parent 20c43287eb
commit 778eb2603d
2 changed files with 27 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 pager.c $NHDT-Date: 1642630920 2022/01/19 22:22:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.210 $ */
/* NetHack 3.7 pager.c $NHDT-Date: 1655120486 2022/06/13 11:41:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.225 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2018. */
/* NetHack may be freely redistributed. See license for details. */
@@ -2249,9 +2249,16 @@ dowhatdoes(void)
#endif
reslt = dowhatdoes_core(q, bufr);
if (reslt) {
char *p = index(reslt, '\n'); /* 'm' prefix has two lines of output */
if (q == '&' || q == '?')
whatdoes_help();
if (p)
*p = '\0';
pline("%s", reslt);
if (p)
/* cheat by knowing how dowhatdoes_core() handles key portion */
pline("%8.8s%s", reslt, p + 1);
} else {
pline("No such command '%s', char code %d (0%03o or 0x%02x).",
visctrl(q), (uchar) q, (uchar) q, (uchar) q);