From 6cfd3367bcd96a8fe59b50b58883315a303ff799 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Mon, 16 Oct 2023 15:55:10 -0400 Subject: [PATCH] Encyclopedia lookup: check all existing fruitnames Use fruit_from_name instead of checking gp.pl_fruit directly so that changing the fruitname won't cause fruits already in the player's inventory to stop working with lookup. --- src/pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pager.c b/src/pager.c index 758c285a8..e72f27b3e 100644 --- a/src/pager.c +++ b/src/pager.c @@ -897,7 +897,7 @@ checkfile( then "fruit" is the alternate description. We do this here so that if the fruit name is an extant object, looking at the fruit yields that object's description. */ - if (!alt && !strncmpi(dbase_str, gp.pl_fruit, PL_FSIZ)) + if (!alt && fruit_from_name(dbase_str, TRUE, (int *) 0)) alt = strcpy(newstr, obj_descr[SLIME_MOLD].oc_name); /* * If the object is named, then the name is the alternate description;