summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.h
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-30 15:44:43 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-30 15:44:43 +0000
commit29c92e989d47c6e35366e01f9e1e0bd09755d056 (patch)
tree1d1bf4711ff943f95a7c3407bb18b8fd7110e4bd /crawl-ref/source/invent.h
parent97fcdb95c6bd42341a089e69745d67a943d3e8db (diff)
downloadcrawl-ref-29c92e989d47c6e35366e01f9e1e0bd09755d056.tar.gz
crawl-ref-29c92e989d47c6e35366e01f9e1e0bd09755d056.zip
When reading a "modification scroll" (prompt: Use on which item?)
don't list the scroll you just read as one to use it on. This fixes the ugly issue where the player, forgetting the slot of the scroll just read, uses identify on itself, thereby wasting the scroll. For enchant armour and recharging it's a moot point as they don't work on scrolls anyway, but this way you can't figure out the subtype. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6251 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.h')
-rw-r--r--crawl-ref/source/invent.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/invent.h b/crawl-ref/source/invent.h
index 8ff0a75e35..4f6bffc642 100644
--- a/crawl-ref/source/invent.h
+++ b/crawl-ref/source/invent.h
@@ -143,7 +143,7 @@ public:
// Loads items from the player's inventory into the menu, and sets the
// title to the stock title. If "procfn" is provided, it'll be called for
// each MenuEntry added, *excluding the title*.
- void load_inv_items(int item_selector = OSEL_ANY,
+ void load_inv_items(int item_selector = OSEL_ANY, int excluded_slot = -1,
MenuEntry *(*procfn)(MenuEntry *me) = NULL);
std::vector<SelItem> get_selitems() const;
@@ -177,6 +177,7 @@ int prompt_invent_item( const char *prompt,
bool allow_auto_list = true,
bool allow_easy_quit = true,
const char other_valid_char = '\0',
+ int excluded_slot = -1,
int *const count = NULL,
operation_types oper = OPER_ANY );
@@ -210,6 +211,7 @@ unsigned char invent_select(
// MT_DROP allows the multidrop toggle
menu_type type = MT_INVLIST,
int item_selector = OSEL_ANY,
+ int excluded_slot = -1,
int menu_select_flags = MF_NOSELECT,
invtitle_annotator titlefn = NULL,
std::vector<SelItem> *sels = NULL,