local-ize a few more variables and functions
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Sun, 15 Dec 2013 10:53:11 +0000 (05:53 -0500)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Sun, 15 Dec 2013 10:53:11 +0000 (05:53 -0500)
autoplace_tubes.lua
item_transport.lua
tubes.lua

index 7f47488fa30964962e59d075093d5eed2364db06..0c648e166e6840ef3d7b9c2071cb3ad88ea43524 100644 (file)
@@ -8,7 +8,7 @@ local function in_table(table,element)
 end
 
 local function is_tube(nodename)
-       return in_table(tubenodes,nodename)
+       return in_table(pipeworks.tubenodes,nodename)
 end
 
 if pipeworks == nil then
index 93e95804aeba70921341133a374a1ae718fa3361..d20dfc32baff1863b099b9ceb17c082283fad250 100644 (file)
@@ -220,7 +220,7 @@ local function addVect(pos,vect)
        return {x=pos.x+vect.x,y=pos.y+vect.y,z=pos.z+vect.z}
 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}}
+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)
        local tbl2={}
index 0faa8f5919c9ab4b9920e17d268f24bd3f91106b..1a31971bff8c5a8124a922ea896ec24a9acd31f3 100644 (file)
--- a/tubes.lua
+++ b/tubes.lua
@@ -1,6 +1,6 @@
 -- This file supplies the various kinds of pneumatic tubes
 
-tubenodes={}
+pipeworks.tubenodes={}
 
 minetest.register_alias("pipeworks:tube", "pipeworks:tube_000000")
 
@@ -118,7 +118,7 @@ for zp = 0, 1 do
                wscale = {x=1,y=1,z=0.01}
        end
        
-       table.insert(tubenodes,name.."_"..tname)
+       table.insert(pipeworks.tubenodes,name.."_"..tname)
        
        local nodedef={
                description = tubedesc,