From 8efcd39e39c6ddafc36423f4627ddbb38b5988b7 Mon Sep 17 00:00:00 2001
From: Novatux <nathanael.courant@laposte.net>
Date: Sun, 18 May 2014 16:41:37 +0200
Subject: Bugfix

---
 item_transport.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'item_transport.lua')

diff --git a/item_transport.lua b/item_transport.lua
index 1777ce6..691f131 100644
--- a/item_transport.lua
+++ b/item_transport.lua
@@ -52,7 +52,7 @@ local function grabAndFire(frominv,frominvname,frompos,fromnode,sname,tube,idef,
 			if tube.can_remove then
 				doRemove = tube.can_remove(frompos, fromnode, stack, dir)
 			elseif idef.allow_metadata_inventory_take then
-				doRemove = idef.allow_metadata_inventory_take(frompos,"main",spos, stack, fakePlayer)
+				doRemove = idef.allow_metadata_inventory_take(frompos, frominvname,spos, stack, fakePlayer)
 			end
 			-- stupid lack of continue statements grumble
 			if doRemove > 0 then
@@ -70,7 +70,7 @@ local function grabAndFire(frominv,frominvname,frompos,fromnode,sname,tube,idef,
 					item = stack:take_item(count)
 					frominv:set_stack(frominvname, spos, stack)
 					if idef.on_metadata_inventory_take then
-						idef.on_metadata_inventory_take(frompos, "main", spos, item, fakePlayer)
+						idef.on_metadata_inventory_take(frompos, frominvname, spos, item, fakePlayer)
 					end
 				end
 				local item1 = pipeworks.tube_item(vector.add(frompos, vector.multiply(dir, 1.4)), item)
-- 
cgit v1.2.3