forked from mtcontrib/pipeworks
Merge pull request #206 from Hawk777/more-tube-parameters
Enhance params to can_remove and remove_item
This commit is contained in:
commit
04db73aa6c
@ -115,7 +115,7 @@ local function grabAndFire(data,slotseq_mode,exmatch_mode,filtmeta,frominv,fromi
|
|||||||
local stack = frominv:get_stack(frominvname, spos)
|
local stack = frominv:get_stack(frominvname, spos)
|
||||||
local doRemove = stack:get_count()
|
local doRemove = stack:get_count()
|
||||||
if fromtube.can_remove then
|
if fromtube.can_remove then
|
||||||
doRemove = fromtube.can_remove(frompos, fromnode, stack, dir)
|
doRemove = fromtube.can_remove(frompos, fromnode, stack, dir, frominvname, spos)
|
||||||
elseif fromdef.allow_metadata_inventory_take then
|
elseif fromdef.allow_metadata_inventory_take then
|
||||||
doRemove = fromdef.allow_metadata_inventory_take(frompos, frominvname,spos, stack, fakePlayer)
|
doRemove = fromdef.allow_metadata_inventory_take(frompos, frominvname,spos, stack, fakePlayer)
|
||||||
end
|
end
|
||||||
@ -146,7 +146,7 @@ local function grabAndFire(data,slotseq_mode,exmatch_mode,filtmeta,frominv,fromi
|
|||||||
end
|
end
|
||||||
if fromtube.remove_items then
|
if fromtube.remove_items then
|
||||||
-- it could be the entire stack...
|
-- it could be the entire stack...
|
||||||
item = fromtube.remove_items(frompos, fromnode, stack, dir, count)
|
item = fromtube.remove_items(frompos, fromnode, stack, dir, count, frominvname, spos)
|
||||||
else
|
else
|
||||||
item = stack:take_item(count)
|
item = stack:take_item(count)
|
||||||
frominv:set_stack(frominvname, spos, stack)
|
frominv:set_stack(frominvname, spos, stack)
|
||||||
|
Loading…
Reference in New Issue
Block a user