From cb1a4eab762f953396c49c15fb178e2f47d56105 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Thu, 16 Aug 2007 19:20:45 +0000 Subject: 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 --- crawl-ref/source/invent.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/invent.cc') 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() -- cgit v1.2.3-54-g00ecf