summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-16 19:20:45 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-16 19:20:45 +0000
commitcb1a4eab762f953396c49c15fb178e2f47d56105 (patch)
tree0baa86d5474f887f880a2cb447936cbb1668bd11 /crawl-ref/source/invent.cc
parent5fc6dd64feee1a620b1b5141ca3efa4ef51766f2 (diff)
downloadcrawl-ref-cb1a4eab762f953396c49c15fb178e2f47d56105.tar.gz
crawl-ref-cb1a4eab762f953396c49c15fb178e2f47d56105.zip
Yet another tutorial update
... and Sif Muna finally gets those other titles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2007 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index c3e8603b76..461d83bda3 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -530,14 +530,19 @@ bool in_inventory( const item_def &i )
unsigned char get_invent( int invent_type )
{
- unsigned char select = invent_select(NULL, MT_INVLIST, invent_type,
+ unsigned char select;
+
+ while (true) {
+ select = invent_select(NULL, MT_INVLIST, invent_type,
MF_SINGLESELECT);
- if ( isalpha(select) )
- {
- const int invidx = letter_to_index(select);
- if ( is_valid_item(you.inv[invidx]) )
- describe_item( you.inv[invidx], true );
- }
+ if ( isalpha(select) )
+ {
+ const int invidx = letter_to_index(select);
+ if ( is_valid_item(you.inv[invidx]) )
+ describe_item( you.inv[invidx], true );
+ }
+ else break;
+ }
redraw_screen();
return select;
} // end get_invent()