summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy <whatever>2013-10-15 15:29:55 -0700
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-10-15 18:37:45 -0400
commitce1acebf6d425176e5faa08eb57a018243efb872 (patch)
tree86213ef018130763fd8ff9722f9e5d42b8cf2bb4
parent28328d975c55b13ce7d2770f5e5ec643f7ac84ac (diff)
downloadpipeworks-ce1acebf6d425176e5faa08eb57a018243efb872.tar
pipeworks-ce1acebf6d425176e5faa08eb57a018243efb872.tar.gz
pipeworks-ce1acebf6d425176e5faa08eb57a018243efb872.tar.bz2
pipeworks-ce1acebf6d425176e5faa08eb57a018243efb872.tar.xz
pipeworks-ce1acebf6d425176e5faa08eb57a018243efb872.zip
Check for on_metadata_inventory_take
-rw-r--r--item_transport.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/item_transport.lua b/item_transport.lua
index ff2d865..721aa19 100644
--- a/item_transport.lua
+++ b/item_transport.lua
@@ -138,7 +138,9 @@ function grabAndFire(frominv,frominvname,frompos,fromnode,sname,tube,idef,dir,al
else
item=stack:take_item(count)
frominv:set_stack(frominvname,spos,stack)
- idef.on_metadata_inventory_take(frompos, "main", spos, item, fakePlayer)
+ if idef.on_metadata_inventory_take then
+ idef.on_metadata_inventory_take(frompos, "main", spos, item, fakePlayer)
+ end
end
item1=tube_item(frompos,item)
item1:get_luaentity().start_pos = frompos