summaryrefslogtreecommitdiff
path: root/item_transport.lua
diff options
context:
space:
mode:
authorVanessaE <vanessaezekowitz@gmail.com>2013-01-16 11:46:38 -0800
committerVanessaE <vanessaezekowitz@gmail.com>2013-01-16 11:46:38 -0800
commitb82aac1ed2bf078cda90c84b72c8983277e0db28 (patch)
tree7e7fdbe5fafe963f2a1749c915cea5d7dd676272 /item_transport.lua
parent1385c8dde26220d5b84b41cb859456a206419644 (diff)
parent78d183011ec5d33867e63e124e6c25785e5df14c (diff)
downloadpipeworks-b82aac1ed2bf078cda90c84b72c8983277e0db28.tar
pipeworks-b82aac1ed2bf078cda90c84b72c8983277e0db28.tar.gz
pipeworks-b82aac1ed2bf078cda90c84b72c8983277e0db28.tar.bz2
pipeworks-b82aac1ed2bf078cda90c84b72c8983277e0db28.tar.xz
pipeworks-b82aac1ed2bf078cda90c84b72c8983277e0db28.zip
Merge pull request #6 from Novatux/master
Item insertion in furnaces through side and mese pipe
Diffstat (limited to 'item_transport.lua')
-rw-r--r--item_transport.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/item_transport.lua b/item_transport.lua
index 9f7f726..db057aa 100644
--- a/item_transport.lua
+++ b/item_transport.lua
@@ -269,6 +269,7 @@ function go_next(pos,velocity,stack)
--print(dump(pos))
local chests={}
local tubes={}
+ local cnode=minetest.env:get_node(pos)
local cmeta=minetest.env:get_meta(pos)
local node
local meta
@@ -276,7 +277,13 @@ function go_next(pos,velocity,stack)
local tube_receiver
local len=1
local n
- for _,vect in ipairs(adjlist) do
+ local can_go
+ if minetest.registered_nodes[cnode.name].tube and minetest.registered_nodes[cnode.name].tube.can_go then
+ can_go=minetest.registered_nodes[cnode.name].tube.can_go(pos,node,velocity,stack)
+ else
+ can_go=adjlist
+ end
+ for _,vect in ipairs(can_go) do
if vect.x~=-velocity.x or vect.y~=-velocity.y or vect.z~=-velocity.z then
npos=addVect(pos,vect)
node=minetest.env:get_node(npos)