diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-25 13:37:44 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-25 13:37:44 +0000 |
commit | 1bbfb19443867f8a1eee94732fb895c82c077e78 (patch) | |
tree | 510a683971fbe37fff31acecf468f6dbddb53ba0 /crawl-ref/source/invent.cc | |
parent | 8e13d689ffe7280149915333f5e21358dba27c22 (diff) | |
download | crawl-ref-1bbfb19443867f8a1eee94732fb895c82c077e78.tar.gz crawl-ref-1bbfb19443867f8a1eee94732fb895c82c077e78.zip |
You can now examine items from the inventory view.
Fixed a bug with item_type_known (oops.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1649 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r-- | crawl-ref/source/invent.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index 2db3364076..8619660b83 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -29,6 +29,7 @@ #include "externs.h" #include "clua.h" +#include "describe.h" #include "itemprop.h" #include "items.h" #include "macro.h" @@ -526,9 +527,16 @@ bool in_inventory( const item_def &i ) unsigned char get_invent( int invent_type ) { - unsigned char nothing = invent_select(NULL, MT_INVLIST, invent_type); + unsigned char 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] ); + } redraw_screen(); - return (nothing); + return select; } // end get_invent() std::string item_class_name( int type, bool terse ) |