diff --git a/src/invent.c b/src/invent.c index 5ff39261b..984d4e1df 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)invent.c 3.5 2005/06/02 */ +/* SCCS Id: @(#)invent.c 3.5 2005/11/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1472,6 +1472,8 @@ struct obj *otmp; makeknown(otmp->otyp); if (otmp->oartifact) discover_artifact((xchar)otmp->oartifact); otmp->known = otmp->dknown = otmp->bknown = otmp->rknown = 1; + if (Is_container(otmp) || otmp->otyp == STATUE) + otmp->cknown = otmp->lknown = 1; if (otmp->otyp == EGG && otmp->corpsenm != NON_PM) learn_egg_type(otmp->corpsenm); } diff --git a/src/objnam.c b/src/objnam.c index b1c5ef1ff..f0e4d047b 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -822,6 +822,9 @@ register struct obj *otmp; #endif !objects[otmp->otyp].oc_name_known) /* ?redundant? */ return TRUE; + if ((!otmp->cknown && (Is_container(otmp) || otmp->otyp == STATUE)) || + (!otmp->lknown && Is_box(otmp))) + return TRUE; if (otmp->oartifact && undiscovered_artifact(otmp->oartifact)) return TRUE; /* otmp->rknown is the only item of interest if we reach here */ diff --git a/src/u_init.c b/src/u_init.c index 0c5ea57aa..b3498f5c9 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)u_init.c 3.5 2005/09/19 */ +/* SCCS Id: @(#)u_init.c 3.5 2005/11/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -980,8 +980,12 @@ register struct trobj *trop; obj->quan = u.umoney0; } else { #endif - obj->dknown = obj->bknown = obj->rknown = 1; if (objects[otyp].oc_uses_known) obj->known = 1; + obj->dknown = obj->bknown = obj->rknown = 1; + if (Is_container(obj) || obj->otyp == STATUE) { + obj->cknown = obj->lknown = 1; + obj->otrapped = 0; + } obj->cursed = 0; if (obj->opoisoned && u.ualign.type != A_CHAOTIC) obj->opoisoned = 0;