summaryrefslogtreecommitdiff
path: root/pipeworks/init.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-10-27 15:13:31 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-10-27 15:13:31 -0400
commit6281dc744dc3951234931a9f44c3bdd353f79df7 (patch)
tree0ead0d0d18be58bed7480cb9a5ea1495230c568f /pipeworks/init.lua
parent2e6082ccdbd121cd5fc0f82a931ac01ac00dcb76 (diff)
downloaddreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.tar
dreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.tar.gz
dreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.tar.bz2
dreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.tar.xz
dreambuilder_modpack-6281dc744dc3951234931a9f44c3bdd353f79df7.zip
updated boost cart, homedecor modpack, castles modpack, currency, farming-redo,
maptools, mesecons, moreblocks, moreores, pipeworks, quartz
Diffstat (limited to 'pipeworks/init.lua')
-rw-r--r--pipeworks/init.lua24
1 files changed, 23 insertions, 1 deletions
diff --git a/pipeworks/init.lua b/pipeworks/init.lua
index 2e05337..e908bcc 100644
--- a/pipeworks/init.lua
+++ b/pipeworks/init.lua
@@ -14,7 +14,6 @@ pipeworks.worldpath = minetest.get_worldpath()
pipeworks.modpath = minetest.get_modpath("pipeworks")
dofile(pipeworks.modpath.."/default_settings.lua")
-
-- Read the external config file if it exists.
local worldsettingspath = pipeworks.worldpath.."/pipeworks_settings.txt"
local worldsettingsfile = io.open(worldsettingspath, "r")
@@ -22,6 +21,9 @@ if worldsettingsfile then
worldsettingsfile:close()
dofile(worldsettingspath)
end
+if pipeworks.toggles.pipe_mode == "pressure" then
+ minetest.log("warning", "pipeworks pressure logic mode comes with caveats and differences in behaviour, you have been warned!")
+end
-- Random variables
@@ -90,9 +92,18 @@ function pipeworks.replace_name(tbl,tr,name)
return ntbl
end
+pipeworks.logger = function(msg)
+ print("[pipeworks] "..msg)
+end
+
-------------------------------------------
-- Load the various other parts of the mod
+-- early auto-detection for finite water mode if not explicitly disabled
+if pipeworks.toggles.finite_water == nil then
+ dofile(pipeworks.modpath.."/autodetect-finite-water.lua")
+end
+
dofile(pipeworks.modpath.."/common.lua")
dofile(pipeworks.modpath.."/models.lua")
dofile(pipeworks.modpath.."/autoplace_pipes.lua")
@@ -111,9 +122,20 @@ dofile(pipeworks.modpath.."/filter-injector.lua")
dofile(pipeworks.modpath.."/trashcan.lua")
dofile(pipeworks.modpath.."/wielder.lua")
+local logicdir = "/pressure_logic/"
+
+-- note that even with these files the new flow logic is not yet default.
+-- registration will take place but no actual ABMs/node logic will be installed,
+-- unless the toggle flag is specifically enabled in the per-world settings flag.
+dofile(pipeworks.modpath..logicdir.."flowable_node_registry.lua")
+dofile(pipeworks.modpath..logicdir.."abms.lua")
+dofile(pipeworks.modpath..logicdir.."abm_register.lua")
+dofile(pipeworks.modpath..logicdir.."flowable_node_registry_install.lua")
+
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-chests.lua")
dofile(pipeworks.modpath.."/compat-furnaces.lua")