summaryrefslogtreecommitdiff
path: root/pipes.lua
diff options
context:
space:
mode:
authorthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-09-27 15:19:20 +0100
committerthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-09-27 15:19:20 +0100
commit59ac9780939b9c130bb70034bccb04ff1e99136d (patch)
treeb68b1deee0797928322b6a2e628d4e8ed4515c51 /pipes.lua
parent64a5b18e8979c0e0e7d0bc06151f0a20b8447fe1 (diff)
downloadpipeworks-59ac9780939b9c130bb70034bccb04ff1e99136d.tar
pipeworks-59ac9780939b9c130bb70034bccb04ff1e99136d.tar.gz
pipeworks-59ac9780939b9c130bb70034bccb04ff1e99136d.tar.bz2
pipeworks-59ac9780939b9c130bb70034bccb04ff1e99136d.tar.xz
pipeworks-59ac9780939b9c130bb70034bccb04ff1e99136d.zip
pipes.lua: place old ABM code registration behind if-guard for new flag
Diffstat (limited to 'pipes.lua')
-rw-r--r--pipes.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/pipes.lua b/pipes.lua
index 5a48801..29f91d3 100644
--- a/pipes.lua
+++ b/pipes.lua
@@ -191,6 +191,13 @@ table.insert(pipes_full_nodenames,"pipeworks:valve_on_loaded")
table.insert(pipes_full_nodenames,"pipeworks:entry_panel_loaded")
table.insert(pipes_full_nodenames,"pipeworks:flow_sensor_loaded")
+
+
+
+if not pipeworks.enable_new_flow_logic then
+-- sorry, no indents... it messes with the patchlogs too much
+
+
minetest.register_abm({
nodenames = pipes_empty_nodenames,
interval = 1,
@@ -228,6 +235,9 @@ minetest.register_abm({
})
+else
+
+
-- run pressure balancing ABM over all water-moving nodes
local pipes_all_nodenames = pipes_full_nodenames
for _, pipe in ipairs(pipes_empty_nodenames) do
@@ -241,3 +251,7 @@ minetest.register_abm({
pipeworks.balance_pressure(pos, node)
end
})
+
+
+
+end \ No newline at end of file