interactive !pickup_types
To use 'O' to clear a value from pickup_types with menustyle Traditional or Combination, you needed to give a value starting with 'a' (for 'all'). Accept space(s) too, similar to removing an object or monster name.
This commit is contained in:
+7
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 options.c $NHDT-Date: 1544396581 2018/12/09 23:03:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.340 $ */
|
/* NetHack 3.6 options.c $NHDT-Date: 1544669347 2018/12/13 02:49:07 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.343 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Michael Allison, 2008. */
|
/*-Copyright (c) Michael Allison, 2008. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -2986,12 +2986,17 @@ boolean tinitial, tfrom_file;
|
|||||||
use_menu = TRUE;
|
use_menu = TRUE;
|
||||||
if (flags.menu_style == MENU_TRADITIONAL
|
if (flags.menu_style == MENU_TRADITIONAL
|
||||||
|| flags.menu_style == MENU_COMBINATION) {
|
|| flags.menu_style == MENU_COMBINATION) {
|
||||||
|
boolean wasspace;
|
||||||
|
|
||||||
use_menu = FALSE;
|
use_menu = FALSE;
|
||||||
Sprintf(qbuf, "New %s: [%s am] (%s)", fullname, ocl,
|
Sprintf(qbuf, "New %s: [%s am] (%s)", fullname, ocl,
|
||||||
*tbuf ? tbuf : "all");
|
*tbuf ? tbuf : "all");
|
||||||
getlin(qbuf, abuf);
|
getlin(qbuf, abuf);
|
||||||
|
wasspace = (abuf[0] == ' '); /* before mungspaces */
|
||||||
op = mungspaces(abuf);
|
op = mungspaces(abuf);
|
||||||
if (abuf[0] == '\0' || abuf[0] == '\033')
|
if (wasspace && !abuf[0])
|
||||||
|
; /* one or more spaces will remove old value */
|
||||||
|
else if (!abuf[0] || abuf[0] == '\033')
|
||||||
op = tbuf; /* restore */
|
op = tbuf; /* restore */
|
||||||
else if (abuf[0] == 'm')
|
else if (abuf[0] == 'm')
|
||||||
use_menu = TRUE;
|
use_menu = TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user