From 659b4e42b2bb6b55a4031554664b6f371f903f5e Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 15 Dec 2013 04:35:59 -0500 Subject: 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. --- init.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'init.lua') diff --git a/init.lua b/init.lua index f11ee39..5798d61 100644 --- a/init.lua +++ b/init.lua @@ -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}, -- cgit v1.2.3