From 893a14e2bdb20e6ffb5c08dec9492a238e0dc977 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Wed, 21 Jul 2021 16:26:00 +0300 Subject: [PATCH] Remove special doinv key The same thing can be done in config file with BIND=0:inventory --- doc/Guidebook.mn | 6 ------ doc/Guidebook.tex | 3 --- doc/fixes37.0 | 1 + include/decl.h | 1 - src/cmd.c | 17 +---------------- 5 files changed, 2 insertions(+), 26 deletions(-) diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index d6468d4b8..b5a3bbc2a 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -4761,12 +4761,6 @@ With .op number_pad only. Default is \(oqn\(cq. -.lp doinv -Show inventory. -With -.op number_pad -only. -Default is \(oq0\(cq. .lp fight Prefix key to force fight a direction. Default is \(oqF\(cq. diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 201ca2366..e77ba2377 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -5224,9 +5224,6 @@ can only be bound to a single key. Prefix key to start a count, to repeat a command this many times. With {\it number\verb+_+pad\/} only. Default is~`{\tt n}'. %.lp -\item[{\bb{doinv}}] -Show inventory. With {\it number\verb+_+pad\/} only. Default is~`{\tt 0}'. -%.lp \item[{\bb{fight}}] Prefix key to force fight a direction. Default is~`{\tt F}'. %.lp diff --git a/doc/fixes37.0 b/doc/fixes37.0 index f861e0a34..df6cf8c7a 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -571,6 +571,7 @@ defer encumbrance check during polymorph to new man; newman() -> redist_attr() fix heap-use-after-free when attacking monster with potion for "a" vs "an", add ukulele and uke as exceptions for "an u" add new extended command #retravel +remove special doinv key, functionality was equal to BIND=0:inventory Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/include/decl.h b/include/decl.h index aad46e7c7..ba915f725 100644 --- a/include/decl.h +++ b/include/decl.h @@ -458,7 +458,6 @@ enum nh_keyfunc { NHKF_FIGHT2, /* '-' */ NHKF_NOPICKUP, /* 'm' */ NHKF_RUN_NOPICKUP, /* 'M' */ - NHKF_DOINV, /* '0' */ NHKF_REDRAW, NHKF_REDRAW2, diff --git a/src/cmd.c b/src/cmd.c index 93205e2a3..7d1185f9c 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -2168,10 +2168,6 @@ static const struct { "Prefix: request a menu (for some non-movement commands)", FALSE }, { NHKF_COUNT, "Prefix: for digits when preceding a command with a count", TRUE }, - { NHKF_DOINV, "numpad: view full inventory", TRUE }, - /* NHKF_DOINV2 for num_pad+pcHack_compat isn't implemented: - { NHKF_DOINV2, "numpad: view inventory of one class of objects", TRUE }, - */ { NHKF_DOAGAIN , "repeat: perform the previous command again", FALSE }, { 0, (const char *) 0, FALSE } }; @@ -3052,7 +3048,6 @@ static struct { { NHKF_FIGHT2, '-', "fight.numpad" }, { NHKF_NOPICKUP, 'm', "nopickup" }, { NHKF_RUN_NOPICKUP, 'M', "run.nopickup" }, - { NHKF_DOINV, '0', "doinv" }, { NHKF_REDRAW, C('r'), "redraw" }, { NHKF_REDRAW2, C('l'), "redraw.numpad" }, { NHKF_GETDIR_SELF, '.', "getdir.self" }, @@ -3477,7 +3472,7 @@ rhack(char *cmd) /* handle most movement commands */ prefix_seen = FALSE; g.context.travel = g.context.travel1 = 0; - spkey = ch2spkeys(*cmd, NHKF_RUN, NHKF_DOINV); + spkey = ch2spkeys(*cmd, NHKF_RUN, NHKF_RUN_NOPICKUP); switch (spkey) { case NHKF_RUSH2: @@ -3537,13 +3532,6 @@ rhack(char *cmd) } else prefix_seen = TRUE; break; - case NHKF_DOINV: - if (!g.Cmd.num_pad) - break; - (void) ddoinv(); /* a convenience borrowed from the PC */ - g.context.move = FALSE; - g.multi = 0; - return; default: if (movecmd(*cmd, MV_WALK)) { /* ordinary movement */ g.context.run = 0; /* only matters here if it was 8 */ @@ -4552,9 +4540,6 @@ parse(void) case M('5'): foo = g.Cmd.spkeys[NHKF_RUN]; break; - case M('0'): - foo = g.Cmd.spkeys[NHKF_DOINV]; - break; default: break; /* as is */ }