From b0553523f0f951ee50c3d7c69f35847a57b5e501 Mon Sep 17 00:00:00 2001 From: k21971 Date: Wed, 17 Jul 2024 14:12:52 +0000 Subject: [PATCH] Show in inventory if the Bell of Opening can't be used (quest not complete). If the player's quest is not complete, the Bell of Opening will not function. I've seen some players forget this and try to use the Bell before their quest is finished. This commit adds a bit of an identifier to the Bell when viewed, it'll be appended with (locked) if it can't be used. As you'd suspect, (locked) goes away once the quest is finished. If anyone has a better suggestion for (locked), I'm all ears. --- doc/evilhack-changelog.md | 1 + src/objnam.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/doc/evilhack-changelog.md b/doc/evilhack-changelog.md index 14f336f07..c82b10cfc 100644 --- a/doc/evilhack-changelog.md +++ b/doc/evilhack-changelog.md @@ -3550,4 +3550,5 @@ The following changes to date are: - Fix: various player monster attacks not damaging other monsters - Additional feedback when damaging monsters vulnerable to elemental damage - Levels of erosion on an object can affect its price +- Show in inventory if the Bell of Opening can't be used (quest not complete) diff --git a/src/objnam.c b/src/objnam.c index 3955d056c..22ec4b1e5 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -742,6 +742,9 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */ propnames(buf, obj->oprops, obj->oprops_known, TRUE, !!strstri(buf, " of ")); + if (typ == BELL_OF_OPENING && !u.uevent.qcompleted) + Strcat(buf, " (locked)"); + if (typ == FIGURINE && omndx != NON_PM) { char anbuf[10]; /* [4] would be enough: 'a','n',' ','\0' */