diff options
Diffstat (limited to 'pipeworks/init.lua')
-rw-r--r-- | pipeworks/init.lua | 24 |
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") |