diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-12-15 16:05:35 -0500 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2013-12-15 16:05:35 -0500 |
commit | 41ce9be8f35539c0144bfc6272782039b7bc9048 (patch) | |
tree | de7400ce92d24436e00be26335d6e0e36214f4cf /item_transport.lua | |
parent | a4a74413c0037b4729e4c728f2b32e91395b7e60 (diff) |
notvel function can't be local - made global and confined to pipeworks.{}
Diffstat (limited to 'item_transport.lua')
-rw-r--r-- | item_transport.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/item_transport.lua b/item_transport.lua index 6b2b494..857a03b 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -222,7 +222,7 @@ end local adjlist={{x=0,y=0,z=1},{x=0,y=0,z=-1},{x=0,y=1,z=0},{x=0,y=-1,z=0},{x=1,y=0,z=0},{x=-1,y=0,z=0}} -local function notvel(tbl,vel) +function pipeworks.notvel(tbl,vel) local tbl2={} for _,val in ipairs(tbl) do if val.x~=-vel.x or val.y~=-vel.y or val.z~=-vel.z then table.insert(tbl2,val) end @@ -255,7 +255,7 @@ local function go_next(pos,velocity,stack) if minetest.registered_nodes[cnode.name] and 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,vel,stack) else - can_go=notvel(adjlist,vel) + can_go=pipeworks.notvel(adjlist,vel) end local meta = nil for _,vect in ipairs(can_go) do |