local-ize a few more variables, move all of the nodebox models

into their own file and confine them and pretty much everything
else to the pipeworks.{} table (still global though).  More to
come.
This commit is contained in:
Vanessa Ezekowitz
2013-12-15 04:35:59 -05:00
parent bd80f18cfc
commit 659b4e42b2
7 changed files with 310 additions and 301 deletions

View File

@ -36,6 +36,8 @@ else
dofile(pipeworks.worldpath.."/pipeworks_settings.txt")
end
-- Random variables
pipeworks.expect_infinite_stacks = true
if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
pipeworks_expect_infinite_stacks = false
@ -43,6 +45,8 @@ end
pipeworks.meseadjlist={{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}}
pipeworks.liquid_texture = "default_water.png"
-- Helper functions
function pipeworks.fix_image_names(table, replacement)
@ -54,7 +58,7 @@ function pipeworks.fix_image_names(table, replacement)
return outtable
end
function pipeworks.add_pipebox(t, b)
function pipeworks.add_node_box(t, b)
for i in ipairs(b)
do table.insert(t, b[i])
end
@ -107,14 +111,15 @@ function pipeworks.replace_name(tbl,tr,name)
return ntbl
end
-- Load the various parts of the mod
-------------------------------------------
-- Load the various other parts of the mod
dofile(pipeworks.modpath.."/models.lua")
dofile(pipeworks.modpath.."/autoplace_pipes.lua")
dofile(pipeworks.modpath.."/autoplace_tubes.lua")
dofile(pipeworks.modpath.."/item_transport.lua")
dofile(pipeworks.modpath.."/flowing_logic.lua")
dofile(pipeworks.modpath.."/crafts.lua")
dofile(pipeworks.modpath.."/tubes.lua")
local rules_all = {{x=0, y=0, z=1},{x=0, y=0, z=-1},{x=1, y=0, z=0},{x=-1, y=0, z=0},