summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-05-29 01:11:05 -0400
committerNeil Moore <neil@s-z.org>2014-05-29 01:20:00 -0400
commit62bc84823eae88aadd27059e47eccaa7afacd604 (patch)
tree73f34014cfa5194285adb4994454cd064c217acf /crawl-ref/source/invent.cc
parentc9b5a15ee71a57ccdb5e845aeb1ba6fb299a34e5 (diff)
downloadcrawl-ref-62bc84823eae88aadd27059e47eccaa7afacd604.tar.gz
crawl-ref-62bc84823eae88aadd27059e47eccaa7afacd604.zip
Show stationary items in pickup menu (#8611)
But do not assign any hotkeys.
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 9644a8adf7..efe1a12cee 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -859,10 +859,20 @@ menu_letter InvMenu::load_items(const vector<const item_def*> &mitems,
{
InvEntry *ie = items_in_class[j];
if (tag == "pickup")
- ie->tag = "pickup";
+ {
+ if (ie->item && item_is_stationary(*ie->item))
+ ie->tag = "nopickup";
+ else
+ ie->tag = "pickup";
+ }
// If there's no hotkey, provide one.
if (ie->hotkeys[0] == ' ')
- ie->hotkeys[0] = ckey++;
+ {
+ if (ie->tag == "nopickup")
+ ie->hotkeys.clear();
+ else
+ ie->hotkeys[0] = ckey++;
+ }
do_preselect(ie);
add_entry(procfn? (*procfn)(ie) : ie);