summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-23 10:26:51 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-09-23 10:26:51 +0000
commitf5edb6c16557b698e2bcd532a61ee08976dd857c (patch)
tree8df1a2b1b3f56b6ea1f510b2d49dc1329bf793c1
parentb6607f0c9782a2385f7351075fea5a883ba29913 (diff)
downloadcrawl-ref-f5edb6c16557b698e2bcd532a61ee08976dd857c.tar.gz
crawl-ref-f5edb6c16557b698e2bcd532a61ee08976dd857c.zip
Fixes bug 1563819, items dropped on lava/water now disintegrate.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@91 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/items.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 4d2b08a548..bb744be701 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1824,9 +1824,11 @@ bool drop_item( int item_dropped, int quant_drop ) {
canned_msg( MSG_EMPTY_HANDED );
}
- if (!copy_item_to_grid( you.inv[item_dropped],
- you.x_pos, you.y_pos, quant_drop, true ))
- {
+ const unsigned char my_grid = grd[you.x_pos][you.y_pos];
+
+ if ( my_grid != DNGN_DEEP_WATER && my_grid != DNGN_LAVA &&
+ !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." );
return (false);
}
@@ -1835,6 +1837,11 @@ bool drop_item( int item_dropped, int quant_drop ) {
quant_name( you.inv[item_dropped], quant_drop, DESC_NOCAP_A, str_pass );
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!");
dec_inv_item_quantity( item_dropped, quant_drop );
you.turn_is_over = 1;