summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreencopper <greencoppermine@gmail.com>2016-02-21 00:02:41 +0100
committerAuke Kok <sofar@foo-projects.org>2016-04-01 22:20:07 -0700
commite30364b2dd8e7f5221271cb4d2f34aadf92c73b1 (patch)
treef3c2473fcc2282fa27d3b7ffa43560f65fcc9cd9
parenta107ca40f0c8f16b56e539f348d51d1f36ffcb8c (diff)
downloadpipeworks-e30364b2dd8e7f5221271cb4d2f34aadf92c73b1.tar
pipeworks-e30364b2dd8e7f5221271cb4d2f34aadf92c73b1.tar.gz
pipeworks-e30364b2dd8e7f5221271cb4d2f34aadf92c73b1.tar.bz2
pipeworks-e30364b2dd8e7f5221271cb4d2f34aadf92c73b1.tar.xz
pipeworks-e30364b2dd8e7f5221271cb4d2f34aadf92c73b1.zip
Changed item_drop to add_item for items dropped during transport.
item_drop makes Minetest 0.4.13 crash, but add_item works in all versions and the behavior is identical when looking at the blocks.
-rw-r--r--item_transport.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/item_transport.lua b/item_transport.lua
index e38125d..ee17611 100644
--- a/item_transport.lua
+++ b/item_transport.lua
@@ -249,7 +249,10 @@ luaentity.register_entity("pipeworks:tubed_item", {
if not found_next then
drop_pos = minetest.find_node_near(vector.add(self.start_pos, velocity), 1, "air")
if drop_pos then
- minetest.item_drop(stack, nil, drop_pos)
+ -- Using add_item instead of item_drop since this makes pipeworks backward
+ -- compatible with Minetest 0.4.13.
+ -- Using item_drop here makes Minetest 0.4.13 crash.
+ minetest.add_item(drop_pos, stack)
self:remove()
return
end