Attached Files |
0001-Autopickup-otherwise-inedible-or-bad-chunks-for-Simu.patch [^] (1,482 bytes) 2013-08-21 13:19 [Show Content] [Hide Content]From 219ba79a80d915350780ff85e9a7d20488802469 Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Wed, 21 Aug 2013 13:16:23 +0200
Subject: Autopickup otherwise inedible or bad chunks for
Simulacrum/Sublimation
This duplicates some of the `wants_any` logic used in food.cc, but it
works for now. Hard checks for either spell exist in more places, too.
Fixes #5006 [Mutagenic chunks not autopickuped with sublimation of blood
memorized]
---
crawl-ref/source/misc.cc | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index ade36ba..77f2df4 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -185,9 +185,14 @@ void turn_corpse_into_chunks(item_def &item, bool bloodspatter,
item.quantity = 1 + random2(max_chunks);
item.quantity = stepdown_value(item.quantity, 4, 4, 12, 12);
+ bool wants_for_spells = you.has_spell(SPELL_SIMULACRUM)
+ || you.has_spell(SPELL_SUBLIMATION_OF_BLOOD);
// Don't mark it as dropped if we are forcing autopickup of chunks.
- if (is_bad_food(item) && you.force_autopickup[OBJ_FOOD][FOOD_CHUNK] <= 0)
+ if (you.force_autopickup[OBJ_FOOD][FOOD_CHUNK] <= 0
+ && is_bad_food(item) && !wants_for_spells)
+ {
item.flags |= ISFLAG_DROPPED;
+ }
else if (you.species != SP_VAMPIRE)
item.flags &= ~(ISFLAG_THROWN | ISFLAG_DROPPED);
--
1.8.3.4
|