calling objects

An earlier attempted fix was not working as intended.  This
accomplishes what I was trying to do.  I haven't reverted
interesting_to_discover() to static within o_init.c.
This commit is contained in:
PatR
2022-12-14 14:07:22 -08:00
parent 96f5f03287
commit e4145f7dc1

View File

@@ -1489,7 +1489,13 @@ call_ok(struct obj *obj)
if (!obj || !objtyp_is_callable(obj->otyp))
return GETOBJ_EXCLUDE;
if (!interesting_to_discover(obj->otyp))
/* not a likely candidate if not seen yet since naming will fail,
or if it has been discovered and doesn't already have a name;
when something has been named and then becomes discovered, it
remains a likely candidate until player renames it to <space>
to remove that no longer needed name */
if (!obj->dknown || (objects[obj->otyp].oc_name_known
&& !objects[obj->otyp].oc_uname))
return GETOBJ_DOWNPLAY;
return GETOBJ_SUGGEST;