diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2017-10-09 06:38:54 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-09 06:38:54 -0400 |
commit | a028aef9c9d82fa43e872b0802b02dbcf0fbb62c (patch) | |
tree | 173534203c946a9914dddc393361fb36ec7a8e01 /init.lua | |
parent | 879b4489b21946306004506bea51b32f6d9de6a2 (diff) | |
parent | 467907602bec6f3a7adfa3058257732a8b903214 (diff) | |
download | pipeworks-a028aef9c9d82fa43e872b0802b02dbcf0fbb62c.tar pipeworks-a028aef9c9d82fa43e872b0802b02dbcf0fbb62c.tar.gz pipeworks-a028aef9c9d82fa43e872b0802b02dbcf0fbb62c.tar.bz2 pipeworks-a028aef9c9d82fa43e872b0802b02dbcf0fbb62c.tar.xz pipeworks-a028aef9c9d82fa43e872b0802b02dbcf0fbb62c.zip |
Merge pull request #204 from thetaepsilon-gamedev/master
More pressure_logic work
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 30 |
1 files changed, 23 insertions, 7 deletions
@@ -17,14 +17,16 @@ dofile(pipeworks.modpath.."/default_settings.lua") -- Read the external config file if it exists. +-- please add any new feature toggles to be a flag in this table... +pipeworks.toggles = {} local worldsettingspath = pipeworks.worldpath.."/pipeworks_settings.txt" local worldsettingsfile = io.open(worldsettingspath, "r") if worldsettingsfile then worldsettingsfile:close() dofile(worldsettingspath) end -if pipeworks.enable_new_flow_logic then - minetest.log("warning", "pipeworks new_flow_logic is WIP and incomplete!") +if pipeworks.toggles.pressure_logic then + minetest.log("warning", "pipeworks pressure-based logic is WIP and incomplete!") end -- Random variables @@ -94,9 +96,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") @@ -115,14 +126,19 @@ dofile(pipeworks.modpath.."/filter-injector.lua") dofile(pipeworks.modpath.."/trashcan.lua") dofile(pipeworks.modpath.."/wielder.lua") +local logicdir = "/new_flow_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 --- individual enable flags also checked in register_flow_logic.lua -if pipeworks.enable_new_flow_logic then - dofile(pipeworks.modpath.."/new_flow_logic.lua") - dofile(pipeworks.modpath.."/register_flow_logic.lua") -end if pipeworks.enable_redefines then dofile(pipeworks.modpath.."/compat-chests.lua") |