Attached Files |
chunk-autopickup.patch [^] (1,145 bytes) 2014-02-22 01:35 [Show Content] [Hide Content]From 07494a2dd11a61dd038d6437aa160379a2fd2d4f Mon Sep 17 00:00:00 2001
From: Sage <SageBasilMint@gmail.com>
Date: Fri, 21 Feb 2014 15:33:35 -0800
Subject: [PATCH] Prevent autopickup on chunks dropped with auto_drop_chunks.
---
crawl-ref/source/items.cc | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 2224327..ee5ef19 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2586,6 +2586,9 @@ bool item_needs_autopickup(const item_def &item)
if (item.props.exists("needs_autopickup"))
return true;
+ if (item.props.exists("prevent_autopickup"))
+ return false;
+
string itemname;
return _is_option_autopickup(item, itemname);
}
@@ -2890,6 +2893,8 @@ static void _do_autopickup()
clear_item_pickup_flags(mitm[o]);
const int result = move_item_to_player(o, num_to_take);
+ if (mitm[o].base_type == OBJ_FOOD && mitm[o].sub_type == FOOD_CHUNK)
+ mitm[o].props["prevent_autopickup"] = true;
if (result == 0 || result == -1)
{
--
1.7.9.5
chunk-autopickup-update.patch [^] (837 bytes) 2014-02-23 15:50 [Show Content] [Hide Content]From fb07cd8447d13624c7f30c01d2c2825bd93a2578 Mon Sep 17 00:00:00 2001
From: Sage <SageBasilMint@gmail.com>
Date: Fri, 21 Feb 2014 15:33:35 -0800
Subject: [PATCH] Prevent autopickup on chunks dropped with auto_drop_chunks.
---
crawl-ref/source/items.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 2224327..4485977 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2890,6 +2890,8 @@ static void _do_autopickup()
clear_item_pickup_flags(mitm[o]);
const int result = move_item_to_player(o, num_to_take);
+ if (mitm[o].base_type == OBJ_FOOD && mitm[o].sub_type == FOOD_CHUNK)
+ mitm[o].flags |= ISFLAG_DROPPED;
if (result == 0 || result == -1)
{
--
1.7.9.5
|