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
This commit is contained in:
PatR
2025-12-09 17:24:33 -08:00
parent 7dc4512bb3
commit bc13a42ce3
2 changed files with 4 additions and 2 deletions

View File

@@ -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();
}
}