From bc13a42ce319f4fdc11abe97921e82e97041955d Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 9 Dec 2025 17:24:33 -0800 Subject: [PATCH] fix issue #1469 - glitches with type-naming Issue reported by ars3niy: assigning names to types of objects, or clearing such, did not update persistent inventory window. Also, the sequence assign-a-name, name-as-' '-to-unname, assign-a-name again, unname again would result in impossible: "named object not in disco". This fixes the impossibility. The fix for #1470 has already taken care of the presistent inventory issue. Fixes #1469 --- doc/fixes3-7-0.txt | 3 +++ src/o_init.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index f7998fdc4..ae91aa08c 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -2168,6 +2168,9 @@ livelog/#chronicle for bribing a demon lord reported random monster and livelog/#chronicle for saving-grace: if saving-grace prevents hero's death, report it [at present, it uses the livelog classification for breaking a conduct] +naming a type of item, unnaming it (with name of ), naming it again + (new name or re-use of old one), then unnaming it again would issue + impossible: "named object not in disco" Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository diff --git a/src/o_init.c b/src/o_init.c index 06b88e57e..d53ee1ecd 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -488,7 +488,7 @@ discover_object( void undiscover_object(int oindx) { - if (!objects[oindx].oc_name_known) { + if (!objects[oindx].oc_name_known && !objects[oindx].oc_encountered) { int dindx, acls = objects[oindx].oc_class; boolean found = FALSE; @@ -510,7 +510,6 @@ undiscover_object(int oindx) if (objects[oindx].oc_class == GEM_CLASS) gem_learned(oindx); /* ok, it's actually been unlearned */ - update_inventory(); } }