tin identification

Tin handling code used tin->cknown to indicate that the variety
(soup, deep fried, pureed, &c) was known, but neither object
identification nor end of game disclosure was setting cknown for
that type of object.

^I behaves as if cknown is set, so the problem was hidden during
times when anyone was likely to be paying attention.
This commit is contained in:
PatR
2020-07-31 13:14:09 -07:00
parent 3388fd5887
commit 97cc689553
5 changed files with 26 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 extern.h $NHDT-Date: 1596162339 2020/07/31 02:25:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.852 $ */
/* NetHack 3.6 extern.h $NHDT-Date: 1596226441 2020/07/31 20:14:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.853 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1044,6 +1044,7 @@ E int FDECL(ggetobj, (const char *, int (*)(OBJ_P), int,
BOOLEAN_P, unsigned *));
E int FDECL(askchain, (struct obj **, const char *, int, int (*)(OBJ_P),
int (*)(OBJ_P), int, const char *));
E void FDECL(set_cknown_lknown, (struct obj *));
E void FDECL(fully_identify_obj, (struct obj *));
E int FDECL(identify, (struct obj *));
E int FDECL(count_unidentified, (struct obj *));

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 obj.h $NHDT-Date: 1596162340 2020/07/31 02:25:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.70 $ */
/* NetHack 3.6 obj.h $NHDT-Date: 1596226442 2020/07/31 20:14:02 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.75 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -106,7 +106,8 @@ struct obj {
Bitfield(in_use, 1); /* for magic items before useup items */
Bitfield(bypass, 1); /* mark this as an object to be skipped by bhito() */
Bitfield(cknown, 1); /* contents of container assumed to be known */
Bitfield(cknown, 1); /* for containers (including statues): the contents
* are known; also applicable to tins */
Bitfield(lknown, 1); /* locked/unlocked status is known */
/* 4 free bits */