From eabced6976d18ff887a4ddd1ef0360e7217c0bb2 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 15 Dec 2013 04:43:13 -0500 Subject: [PATCH] default settings have to be global or pipeworks can't see them (duh!) confined them to pipeworks.{} table. --- default_settings.txt | 32 ++++++++++++++++---------------- init.lua | 14 +++++++------- item_transport.lua | 4 ++-- tubes.lua | 16 ++++++++-------- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/default_settings.txt b/default_settings.txt index 76bb756..f594a16 100644 --- a/default_settings.txt +++ b/default_settings.txt @@ -1,18 +1,18 @@ -- Various settings -local enable_pipes = true -local enable_autocrafter = true -local enable_deployer = true -local enable_node_breaker = true -local enable_teleport_tube = true -local enable_pipe_devices = true -local enable_redefines = true -local enable_mese_tube = true -local enable_detector_tube = true -local enable_conductor_tube = true -local enable_accelerator_tube = true -local enable_crossing_tube = true -local enable_sand_tube = true -local enable_mese_sand_tube = true -local enable_one_way_tube = true -local CYCLIC = true +pipeworks.enable_pipes = true +pipeworks.enable_autocrafter = true +pipeworks.enable_deployer = true +pipeworks.enable_node_breaker = true +pipeworks.enable_teleport_tube = true +pipeworks.enable_pipe_devices = true +pipeworks.enable_redefines = true +pipeworks.enable_mese_tube = true +pipeworks.enable_detector_tube = true +pipeworks.enable_conductor_tube = true +pipeworks.enable_accelerator_tube = true +pipeworks.enable_crossing_tube = true +pipeworks.enable_sand_tube = true +pipeworks.enable_mese_sand_tube = true +pipeworks.enable_one_way_tube = true +pipeworks.enable_cyclic_mode = true diff --git a/init.lua b/init.lua index 5798d61..101bb52 100644 --- a/init.lua +++ b/init.lua @@ -126,13 +126,13 @@ 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, {x=0, y=1, z=1},{x=0, y=1, z=-1},{x=1, y=1, z=0},{x=-1, y=1, z=0}, {x=0, y=-1, z=1},{x=0, y=-1, z=-1},{x=1, y=-1, z=0},{x=-1, y=-1, z=0}, {x=0, y=1, z=0}, {x=0, y=-1, z=0}} -if enable_pipes then dofile(pipeworks.modpath.."/pipes.lua") end -if enable_teleport_tube then dofile(pipeworks.modpath.."/teleport_tube.lua") end -if enable_pipe_devices then dofile(pipeworks.modpath.."/devices.lua") end -if enable_redefines then dofile(pipeworks.modpath.."/compat.lua") end -if enable_autocrafter then dofile(pipeworks.modpath.."/autocrafter.lua") end -if enable_deployer then dofile(pipeworks.modpath.."/deployer.lua") end -if enable_node_breaker then dofile(pipeworks.modpath.."/node_breaker.lua") end +if pipeworks.enable_pipes then dofile(pipeworks.modpath.."/pipes.lua") end +if pipeworks.enable_teleport_tube then dofile(pipeworks.modpath.."/teleport_tube.lua") end +if pipeworks.enable_pipe_devices then dofile(pipeworks.modpath.."/devices.lua") end +if pipeworks.enable_redefines then dofile(pipeworks.modpath.."/compat.lua") end +if pipeworks.enable_autocrafter then dofile(pipeworks.modpath.."/autocrafter.lua") end +if pipeworks.enable_deployer then dofile(pipeworks.modpath.."/deployer.lua") end +if pipeworks.enable_node_breaker then dofile(pipeworks.modpath.."/node_breaker.lua") end minetest.register_alias("pipeworks:pipe", "pipeworks:pipe_110000_empty") diff --git a/item_transport.lua b/item_transport.lua index 76eeb56..632919a 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -471,7 +471,7 @@ function go_next(pos,velocity,stack) break end until false - if CYCLIC then + if pipeworks.enable_cyclic_mode then meta:set_int("tubedir",n) end velocity.x=tubes[n].vect.x*vel.speed @@ -492,7 +492,7 @@ function go_next(pos,velocity,stack) break end until false - if CYCLIC then + if pipeworks.enable_cyclic_mode then meta:set_int("tubedir",n) end velocity.x=chests[n].vect.x*speed diff --git a/tubes.lua b/tubes.lua index 3eafb80..75f2115 100644 --- a/tubes.lua +++ b/tubes.lua @@ -223,7 +223,7 @@ local mese_end_textures={"pipeworks_mese_tube_end.png","pipeworks_mese_tube_end. local mese_short_texture="pipeworks_mese_tube_short.png" local mese_inv_texture="pipeworks_mese_tube_inv.png" -if enable_mese_tube then +if pipeworks.enable_mese_tube then pipeworks.register_tube("pipeworks:mese_tube","Mese pneumatic tube segment",mese_plain_textures,mese_noctr_textures, mese_end_textures,mese_short_texture,mese_inv_texture, {tube={can_go=function(pos,node,velocity,stack) @@ -327,7 +327,7 @@ end local mesecons_rules={{x=0,y=0,z=1},{x=0,y=0,z=-1},{x=1,y=0,z=0},{x=-1,y=0,z=0},{x=0,y=1,z=0},{x=0,y=-1,z=0}} -if enable_detector_tube then +if pipeworks.enable_detector_tube then local detector_plain_textures={"pipeworks_detector_tube_plain.png","pipeworks_detector_tube_plain.png","pipeworks_detector_tube_plain.png", "pipeworks_detector_tube_plain.png","pipeworks_detector_tube_plain.png","pipeworks_detector_tube_plain.png"} @@ -395,7 +395,7 @@ local conductor_on_noctr_textures={"pipeworks_conductor_tube_on_noctr.png","pipe local conductor_on_end_textures={"pipeworks_conductor_tube_on_end.png","pipeworks_conductor_tube_on_end.png","pipeworks_conductor_tube_on_end.png", "pipeworks_conductor_tube_on_end.png","pipeworks_conductor_tube_on_end.png","pipeworks_conductor_tube_on_end.png"} -if enable_conductor_tube then +if pipeworks.enable_conductor_tube then pipeworks.register_tube("pipeworks:conductor_tube_off","Conductor tube segment",conductor_plain_textures,conductor_noctr_textures, conductor_end_textures,conductor_short_texture,conductor_inv_texture, {groups={mesecon=2}, @@ -423,7 +423,7 @@ local accelerator_end_textures={"pipeworks_accelerator_tube_end.png","pipeworks_ local accelerator_short_texture="pipeworks_accelerator_tube_short.png" local accelerator_inv_texture="pipeworks_accelerator_tube_inv.png" -if enable_accelerator_tube then +if pipeworks.enable_accelerator_tube then pipeworks.register_tube("pipeworks:accelerator_tube","Accelerator pneumatic tube segment",accelerator_plain_textures, accelerator_noctr_textures,accelerator_end_textures,accelerator_short_texture,accelerator_inv_texture, {tube={can_go=function(pos,node,velocity,stack) @@ -433,7 +433,7 @@ if enable_accelerator_tube then }) end -if enable_crossing_tube then +if pipeworks.enable_crossing_tube then pipeworks.register_tube("pipeworks:crossing_tube","Crossing tube segment",accelerator_plain_textures, accelerator_noctr_textures,accelerator_end_textures,accelerator_short_texture,accelerator_inv_texture, {tube={can_go=function(pos,node,velocity,stack) @@ -451,7 +451,7 @@ local sand_end_textures={"pipeworks_sand_tube_end.png","pipeworks_sand_tube_end. local sand_short_texture="pipeworks_sand_tube_short.png" local sand_inv_texture="pipeworks_sand_tube_inv.png" -if enable_sand_tube then +if pipeworks.enable_sand_tube then pipeworks.register_tube("pipeworks:sand_tube","Sand pneumatic tube segment",sand_plain_textures,sand_noctr_textures,sand_end_textures, sand_short_texture,sand_inv_texture, {groups={sand_tube=1}}) @@ -483,7 +483,7 @@ local mese_sand_end_textures={"pipeworks_mese_sand_tube_end.png","pipeworks_mese local mese_sand_short_texture="pipeworks_mese_sand_tube_short.png" local mese_sand_inv_texture="pipeworks_mese_sand_tube_inv.png" -if enable_mese_sand_tube then +if pipeworks.enable_mese_sand_tube then pipeworks.register_tube("pipeworks:mese_sand_tube","Mese sand pneumatic tube segment",mese_sand_plain_textures,mese_sand_noctr_textures,mese_sand_end_textures, mese_sand_short_texture,mese_sand_inv_texture, {groups={mese_sand_tube=1}, @@ -552,7 +552,7 @@ local function facedir_to_right_dir(facedir) z=topdir.x*backdir.y - backdir.x*topdir.y} end -if enable_one_way_tube then +if pipeworks.enable_one_way_tube then minetest.register_node("pipeworks:one_way_tube", { description = "One way tube", tiles = {"pipeworks_one_way_tube_top.png", "pipeworks_one_way_tube_top.png", "pipeworks_one_way_tube_output.png", -- 2.30.2