From: PatR Date: Thu, 5 Aug 2021 19:32:30 +0000 (-0700) Subject: fix engraving with miscellaneous items X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91ee7f28ee7e98d8f65d673fb94d218031bd62d8;p=nethack fix engraving with miscellaneous items Reported directly to devteam: when selecting an item to engrave with, "getobj refactor"'s stylus_ok() classified none-of-the-above objects as not viable instead of allowing arbitrary things to engrave in the dust or give specific can't-use-that messages like for food. Make the suggested fix: change default result when checking an inventory item for applicability from GETOBJ_EXCLUDE to GETOBJ_DOWNPLAY. Engrave feedback rather than getobj selection: splash of venom isn't necessarily wizard mode-only so don't reject attempting to engrave with it as using an illegal object. And remove the extra question mark from its "poison pen" message. --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 0e9d3eda6..5b82e7540 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -733,6 +733,7 @@ give genetic engineers teleport capability (as they had in slash'em); 'port if an invisible hero managed to convert an unaligned altar to an aligned one with color enabled, altar wasn't immediately redrawn with new color repair some regressions to (a)pply introduced by "getobj refactor" patch +getobj too: allow attempting to (E)ngrave with any item in inventory fix ^X feedback when held typo: "unseen createure" -> "unseen creature" if a corpse was set to revive as a zombie and corpse was partly eaten at revival time and monster is defined as providing more diff --git a/src/engrave.c b/src/engrave.c index da5e50510..aa284062e 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -442,7 +442,7 @@ stylus_ok(struct obj *obj) && (obj->otyp == TOWEL || obj->otyp == MAGIC_MARKER)) return GETOBJ_SUGGEST; - return GETOBJ_EXCLUDE; + return GETOBJ_DOWNPLAY; } /* can hero engrave at all (at their location)? */ @@ -879,11 +879,12 @@ doengrave(void) break; case VENOM_CLASS: - if (wizard) { - pline("Writing a poison pen letter??"); - break; - } - /*FALLTHRU*/ + /* this used to be ``if (wizard)'' and fall through to ILLOBJ_CLASS + for normal play, but splash of venom isn't "illegal" because it + could occur in normal play via wizard mode bones */ + pline("Writing a poison pen letter?"); + break; + case ILLOBJ_CLASS: impossible("You're engraving with an illegal object!"); break;