diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-12 14:32:40 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-12 14:32:40 +0000 |
commit | 170c1de4d2bc1b996f11cffdec0fc49cfe71c388 (patch) | |
tree | f4edd4036c6cc8711048f0f1baf64c6456ae9add /crawl-ref/source/items.cc | |
parent | 5e94dac9e3537693dfaa1647c143959d1ce5e069 (diff) | |
download | crawl-ref-170c1de4d2bc1b996f11cffdec0fc49cfe71c388.tar.gz crawl-ref-170c1de4d2bc1b996f11cffdec0fc49cfe71c388.zip |
Try to merge items before reporting explore stop messages.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@620 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 9b03065bcd..24df6761d9 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -61,7 +61,6 @@ #include "stash.h" static void autopickup(void); -static bool is_stackable_item( const item_def &item ); static bool invisible_to_player( const item_def& item ); static void item_list_on_square( std::vector<const item_def*>& items, int obj, bool force_squelch = false ); @@ -1280,7 +1279,7 @@ void pickup() } } // end pickup() -static bool is_stackable_item( const item_def &item ) +bool is_stackable_item( const item_def &item ) { if (!is_valid_item( item )) return (false); @@ -1290,6 +1289,7 @@ static bool is_stackable_item( const item_def &item ) || item.base_type == OBJ_SCROLLS || item.base_type == OBJ_POTIONS || item.base_type == OBJ_UNKNOWN_II + || item.base_type == OBJ_GOLD || (item.base_type == OBJ_MISCELLANY && item.sub_type == MISC_RUNE_OF_ZOT)) { @@ -1309,6 +1309,9 @@ bool items_stack( const item_def &item1, const item_def &item2 ) if (item1.base_type != item2.base_type || item1.sub_type != item2.sub_type) return (false); + if (item1.base_type == OBJ_GOLD) + return (true); + // These classes also require pluses and special if (item1.base_type == OBJ_MISSILES || item1.base_type == OBJ_MISCELLANY) // only runes |