'Iu' vs unknown container contents

An inventory of unpaid items where more than one was present would
show
|> bag's contents    N zorkmids
if any of the items were inside a container whose contents aren't
known.  But if there was only one item (so container must be owned
by hero) the 'Iu' output menu was skipped for pline and yielded
|> scroll of magic mapping   133 zorkmids
Force the menu display if the lone unpaid item is inside a container
whose contents are unknown.

I'm not sure whether a hero-owned container can have both unknown
contents and an unpaid item in normal play.  I managed it while
trying to fix a reported problem--except I can no longer find the
relevant report--where itemized shop billing also revealed unseen
container contents (for any number of items, not just 1).  That isn't
fixed yet, but I want to get the simpler 'Iu' part out of the way.
This commit is contained in:
PatR
2018-02-07 17:31:44 -08:00
parent 1b8df876c3
commit b5b513fb44
4 changed files with 31 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 extern.h $NHDT-Date: 1517128658 2018/01/28 08:37:38 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.624 $ */
/* NetHack 3.6 extern.h $NHDT-Date: 1518053385 2018/02/08 01:29:45 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.625 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1284,6 +1284,7 @@ E struct obj *FDECL(splitobj, (struct obj *, long));
E struct obj *FDECL(unsplitobj, (struct obj *));
E void NDECL(clear_splitobjs);
E void FDECL(replace_object, (struct obj *, struct obj *));
E struct obj *FDECL(unknwn_contnr_contents, (struct obj *));
E void FDECL(bill_dummy_object, (struct obj *));
E void FDECL(costly_alteration, (struct obj *, int));
E struct obj *FDECL(mksobj, (int, BOOLEAN_P, BOOLEAN_P));