fix bz623 - 'D' when not carrying anything
With menustyle set to "full" or "partial", using 'D' when not carrying anything gave no feedback. (Modes "traditional" and "combination" give "you have nothing to drop" via ggetobj().) Also, there's no need to reset in-progress armor removal, lock picking, or trap setting if you don't actually drop anything. The inventory they're set to operate on or with stays intact.
This commit is contained in:
@@ -336,6 +336,8 @@ if user supplied a specific monster name when asked to choose a monster class,
|
|||||||
S_quadruped due to being preceded by "titanothere" in mons[])
|
S_quadruped due to being preceded by "titanothere" in mons[])
|
||||||
change ing_suffix() to not double final 'w' when adding 'ing' ('t=' yielded
|
change ing_suffix() to not double final 'w' when adding 'ing' ('t=' yielded
|
||||||
"You mime throwwing something.")
|
"You mime throwwing something.")
|
||||||
|
using 'D' to drop when not carrying anything finished (after doing nothing)
|
||||||
|
without giving any feedback for menustyles "full" and "partial"
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 do.c $NHDT-Date: 1464487100 2016/05/29 01:58:20 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.156 $ */
|
/* NetHack 3.6 do.c $NHDT-Date: 1472809073 2016/09/02 09:37:53 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.158 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -34,7 +34,8 @@ dodrop()
|
|||||||
result = drop(getobj(&drop_types[i], "drop"));
|
result = drop(getobj(&drop_types[i], "drop"));
|
||||||
if (*u.ushops)
|
if (*u.ushops)
|
||||||
sellobj_state(SELL_NORMAL);
|
sellobj_state(SELL_NORMAL);
|
||||||
reset_occupations();
|
if (result)
|
||||||
|
reset_occupations();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -739,6 +740,10 @@ doddrop()
|
|||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
|
||||||
|
if (!invent) {
|
||||||
|
You("have nothing to drop.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
add_valid_menu_class(0); /* clear any classes already there */
|
add_valid_menu_class(0); /* clear any classes already there */
|
||||||
if (*u.ushops)
|
if (*u.ushops)
|
||||||
sellobj_state(SELL_DELIBERATE);
|
sellobj_state(SELL_DELIBERATE);
|
||||||
@@ -747,7 +752,8 @@ doddrop()
|
|||||||
result = menu_drop(result);
|
result = menu_drop(result);
|
||||||
if (*u.ushops)
|
if (*u.ushops)
|
||||||
sellobj_state(SELL_NORMAL);
|
sellobj_state(SELL_NORMAL);
|
||||||
reset_occupations();
|
if (result)
|
||||||
|
reset_occupations();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -785,6 +791,7 @@ int retry;
|
|||||||
free((genericptr_t) pick_list);
|
free((genericptr_t) pick_list);
|
||||||
} else if (flags.menu_style == MENU_COMBINATION) {
|
} else if (flags.menu_style == MENU_COMBINATION) {
|
||||||
unsigned ggoresults = 0;
|
unsigned ggoresults = 0;
|
||||||
|
|
||||||
all_categories = FALSE;
|
all_categories = FALSE;
|
||||||
/* Gather valid classes via traditional NetHack method */
|
/* Gather valid classes via traditional NetHack method */
|
||||||
i = ggetobj("drop", drop, 0, TRUE, &ggoresults);
|
i = ggetobj("drop", drop, 0, TRUE, &ggoresults);
|
||||||
|
|||||||
+7
-5
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 invent.c $NHDT-Date: 1461967848 2016/04/29 22:10:48 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.208 $ */
|
/* NetHack 3.6 invent.c $NHDT-Date: 1472809075 2016/09/02 09:37:55 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.210 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1573,13 +1573,15 @@ unsigned *resultflags;
|
|||||||
char extra_removeables[3 + 1]; /* uwep,uswapwep,uquiver */
|
char extra_removeables[3 + 1]; /* uwep,uswapwep,uquiver */
|
||||||
char buf[BUFSZ], qbuf[QBUFSZ];
|
char buf[BUFSZ], qbuf[QBUFSZ];
|
||||||
|
|
||||||
|
if (!invent) {
|
||||||
|
You("have nothing to %s.", word);
|
||||||
|
if (resultflags)
|
||||||
|
*resultflags = ALL_FINISHED;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (resultflags)
|
if (resultflags)
|
||||||
*resultflags = 0;
|
*resultflags = 0;
|
||||||
takeoff = ident = allflag = m_seen = FALSE;
|
takeoff = ident = allflag = m_seen = FALSE;
|
||||||
if (!invent) {
|
|
||||||
You("have nothing to %s.", word);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
add_valid_menu_class(0); /* reset */
|
add_valid_menu_class(0); /* reset */
|
||||||
if (taking_off(word)) {
|
if (taking_off(word)) {
|
||||||
takeoff = TRUE;
|
takeoff = TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user