summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua8
-rw-r--r--new_flow_logic/register_local_pipes.lua54
-rw-r--r--todo/new_flow_logic.txt4
3 files changed, 3 insertions, 63 deletions
diff --git a/init.lua b/init.lua
index e8a8d2f..2a95be6 100644
--- a/init.lua
+++ b/init.lua
@@ -121,7 +121,9 @@ dofile(pipeworks.modpath.."/wielder.lua")
local logicdir = "/new_flow_logic/"
--- note that even with these files the new flow logic is not yet default
+-- 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 pipeworks.enable_new_flow_logic has been set.
dofile(pipeworks.modpath..logicdir.."flowable_node_registry.lua")
dofile(pipeworks.modpath..logicdir.."abms.lua")
dofile(pipeworks.modpath..logicdir.."abm_register.lua")
@@ -130,10 +132,6 @@ 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_local_pipes.lua
-if pipeworks.enable_new_flow_logic then
- dofile(pipeworks.modpath..logicdir.."register_local_pipes.lua")
-end
if pipeworks.enable_redefines then
dofile(pipeworks.modpath.."/compat-chests.lua")
diff --git a/new_flow_logic/register_local_pipes.lua b/new_flow_logic/register_local_pipes.lua
deleted file mode 100644
index 0de0056..0000000
--- a/new_flow_logic/register_local_pipes.lua
+++ /dev/null
@@ -1,54 +0,0 @@
--- registration of pipework's own pipes.
--- written 2017 by thetaepsilon
-
-
-
--- global values and thresholds for water behaviour
--- TODO: add some way of setting this per-world
-local thresholds = {}
--- limit on pump pressure - will not absorb more than can be taken
-thresholds.pump_pressure = 2
--- activation threshold for spigot
--- should not be below 1, as spigot helper code indiscriminately places a water source node if run.
-thresholds.spigot_min = 1
-
-
-
-local pipes_full_nodenames = pipeworks.pipes_full_nodenames
-local pipes_empty_nodenames = pipeworks.pipes_empty_nodenames
-
-local register = pipeworks.flowables.register
-local flowlogic = pipeworks.flowlogic
-
-
-
--- FIXME: DRY principle for names, move this to devices.lua?
--- FIXME: all devices still considered simple
-local pump_on = "pipeworks:pump_on"
-local pump_off = "pipeworks:pump_off"
-local spigot_off = "pipeworks:spigot"
-local spigot_on = "pipeworks:spigot_pouring"
-
-if pipeworks.enable_pipes then
- --[[
- for _, pipe in ipairs(pipes_full_nodenames) do
- register.simple(pipe)
- end
- for _, pipe in ipairs(pipes_empty_nodenames) do
- register.simple(pipe)
- end
- ]]
-
- if pipeworks.enable_pipe_devices then
- --register.simple(pump_off)
- --register.simple(pump_on)
- --register.simple(spigot_on)
- --register.simple(spigot_off)
-
- --register.intake_simple(pump_on, thresholds.pump_pressure)
- -- TODO: the code doesn't currently care if the spigot is the visually flowing node or not.
- -- So some mechanism to register on/off states would be nice
- --register.output(spigot_off, thresholds.spigot_min, flowlogic.helpers.output_spigot)
- --register.output(spigot_on, thresholds.spigot_min, flowlogic.helpers.output_spigot)
- end
-end
diff --git a/todo/new_flow_logic.txt b/todo/new_flow_logic.txt
index acd6d1a..46f6c22 100644
--- a/todo/new_flow_logic.txt
+++ b/todo/new_flow_logic.txt
@@ -1,6 +1,2 @@
--- Per-world configuration of pump thresholds
-This should be relatively trivial to do, just a case of adding another property to the pipeworks global that can be set per-world with pipeworks_settings.txt.
-This does not appear to be that big a deal right now, as the internal threshold can always be changed.
-
-- Internal code to the effect of "is_node_flowable()"
This is basically to implement valves - currently the flow logic will happily balance pipes with neighbour nodes that just happen to have the pressure property in their metadata.