fix #K4172 - selling all into container
When using #loot to put items into a shop-owned container on a shop's floor, you are asked "Sell it? [ynaq] (n)" for each item, but the 'a' and 'q' choices only worked as y or n for the current item. By the next one, the preferred answer had been reset to default and ynaq was asked again. Set a flag in use_container() to have in_container() set the sell vs don't sell state for the first item but not for any others. Reset the state at the end of use_container() instead of after each item in in_container(). This bug was present in 3.6.x, also in 3.4.3, and probably earlier.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 decl.c $NHDT-Date: 1706079841 2024/01/24 07:04:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.314 $ */
|
||||
/* NetHack 3.7 decl.c $NHDT-Date: 1720074480 2024/07/04 06:28:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.334 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2009. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -792,6 +792,7 @@ static const struct instance_globals_s g_init_s = {
|
||||
(struct menucoloring *) 0, /* save_colorings */
|
||||
FALSE, /* simple_options_help */
|
||||
/* pickup.c */
|
||||
FALSE, /* sellobj_first */
|
||||
FALSE, /* shop_filter */
|
||||
/* pline.c */
|
||||
#ifdef DUMPLOG_CORE
|
||||
|
||||
Reference in New Issue
Block a user