From f8dadea90481b48d911cc616f3f7e4c8f91d984d Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 23 Sep 2006 14:43:49 +0000 Subject: Better refix of the drop-on-destroying-grid bug. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@94 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/items.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index ca69eceebb..d8d7a250e4 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -1821,7 +1821,7 @@ bool drop_item( int item_dropped, int quant_drop ) { const unsigned char my_grid = grd[you.x_pos][you.y_pos]; - if ( my_grid != DNGN_DEEP_WATER && my_grid != DNGN_LAVA && + if ( !grid_destroys_items(my_grid) && !copy_item_to_grid( you.inv[item_dropped], you.x_pos, you.y_pos, quant_drop, true )) { mpr( "Too many items on this level, not dropping the item." ); @@ -1833,10 +1833,9 @@ bool drop_item( int item_dropped, int quant_drop ) { snprintf( info, INFO_SIZE, "You drop %s.", str_pass ); mpr(info); - if ( my_grid == DNGN_DEEP_WATER ) - mpr("It sinks quickly."); - else if ( my_grid == DNGN_DEEP_WATER ) - mpr("It burns up!"); + if ( grid_destroys_items(my_grid) ) { + mprf(MSGCH_SOUND, grid_item_destruction_message(my_grid)); + } dec_inv_item_quantity( item_dropped, quant_drop ); you.turn_is_over = 1; -- cgit v1.2.3-54-g00ecf