summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index b162e2e739..a8320981b7 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -173,6 +173,13 @@ const int InvEntry::item_freshness() const
return freshness;
}
+void InvEntry::select(int qty)
+{
+ if ( item && item->quantity < qty )
+ qty = item->quantity;
+ MenuEntry::select(qty);
+}
+
std::string InvEntry::get_text() const
{
std::ostringstream tstr;
@@ -947,10 +954,10 @@ unsigned char invent_select( const char *title,
return (menu.getkey());
}
-unsigned char invent( int item_class_inv, bool show_price )
+void browse_inventory( bool show_price )
{
InvShowPrices show_item_prices(show_price);
- return (invent_select(NULL, MT_INVLIST, item_class_inv));
+ get_invent(OSEL_ANY);
}
// Reads in digits for a count and apprends then to val, the