1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-29 23:00:49 +02:00

local-ize pretty muchg everything that was previously global except where

stuff needs to be globally-visible.  Also, fix a bad drop on valve.
This commit is contained in:
Vanessa Ezekowitz
2013-12-15 02:53:10 -05:00
parent b43a1036ca
commit bd80f18cfc
14 changed files with 344 additions and 345 deletions

View File

@ -99,10 +99,10 @@ minetest.register_node("pipeworks:filter", {
return inv:is_empty("main")
end,
after_place_node = function(pos)
tube_scanforobjects(pos)
pipeworks.scan_for_tube_objects(pos)
end,
after_dig_node = function(pos)
tube_scanforobjects(pos)
pipeworks.scan_for_tube_objects(pos)
end,
mesecons={effector={action_on=function(pos,node)
minetest.registered_nodes[node.name].on_punch(pos,node,nil)
@ -167,10 +167,10 @@ minetest.register_node("pipeworks:mese_filter", {
return inv:is_empty("main")
end,
after_place_node = function(pos)
tube_scanforobjects(pos)
pipeworks.scan_for_tube_objects(pos)
end,
after_dig_node = function(pos)
tube_scanforobjects(pos)
pipeworks.scan_for_tube_objects(pos)
end,
mesecons={effector={action_on=function(pos,node)
minetest.registered_nodes[node.name].on_punch(pos,node,nil)
@ -390,7 +390,7 @@ end
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}}
function notvel(tbl,vel)
tbl2={}
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
end