more container flags (trunk only)

cknown and lknown flags for containers are now checked when deciding
whether an item is fully identified, and they're set when identification
takes place.  (You'll learn how many items are inside even if you haven't
looked to see what they are yet.  This means that an inventory listing of
unpaid items will reveal the contents after you've used enouch magic to ID
an unpaid container.)  Also, set those flags for any container in initial
inventory; rogues should know that sack starts out empty.
This commit is contained in:
nethack.rankin
2005-11-06 06:10:32 +00:00
parent b9ae4361af
commit 0a3ac165cc
3 changed files with 12 additions and 3 deletions

View File

@@ -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 */