summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/xom.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-12-30 00:57:03 -0800
committerStefan O'Rear <stefanor@cox.net>2009-12-30 00:57:03 -0800
commit4db1d75dca2405e186a3e9869a2aa9e058cbf71f (patch)
tree87799a99c1980b14f32668f40817d581f64f203b /crawl-ref/source/xom.cc
parent8a504d20b9992fea2daac06faa6ca5559ca63ae0 (diff)
downloadcrawl-ref-4db1d75dca2405e186a3e9869a2aa9e058cbf71f.tar.gz
crawl-ref-4db1d75dca2405e186a3e9869a2aa9e058cbf71f.zip
Allow tiles to destroy only some items.
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r--crawl-ref/source/xom.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 4fdb333dd4..40a19123cb 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -659,11 +659,8 @@ static void _xom_make_item(object_class_type base, int subtype, int power)
items(true, base, subtype, true, power, MAKE_ITEM_RANDOM_RACE,
0, 0, GOD_XOM);
- if (feat_destroys_items(grd(you.pos())))
+ if (feat_destroys_item(grd(you.pos()), mitm[thing_created], !silenced(you.pos())))
{
- if (!silenced(you.pos()))
- mprf(MSGCH_SOUND, feat_item_destruction_message(grd(you.pos())));
-
simple_god_message(" snickers.", GOD_XOM);
destroy_item(thing_created, true);
thing_created = NON_ITEM;
@@ -2425,7 +2422,7 @@ static void _xom_zero_miscast()
}
}
- if (!feat_destroys_items(feat) && !feat_is_solid(feat)
+ if (feat_has_solid_floor(feat)
&& inv_items.size() > 0)
{
int idx = inv_items[random2(inv_items.size())];