From: Cy Date: Tue, 15 Oct 2013 22:29:55 +0000 (-0700) Subject: Check for on_metadata_inventory_take X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=ce1acebf6d425176e5faa08eb57a018243efb872;p=zefram%2Fminetest%2Fpipeworks.git Check for on_metadata_inventory_take --- 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