From e4145f7dc16f24044acb51287d2c08ef13373c83 Mon Sep 17 00:00:00 2001 From: PatR Date: Wed, 14 Dec 2022 14:07:22 -0800 Subject: [PATCH] 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. --- src/do_name.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/do_name.c b/src/do_name.c index 9022bf31e..3145b296a 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -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 + 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;