summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-10-01 21:17:05 +0100
committerthetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com>2017-10-01 21:17:05 +0100
commit76ebd0a0e1552e0b519716deca3d77e03d1b6b94 (patch)
tree0e65f1343bf14ecd89a072c8032451e659472b2d
parent667eeb7d095f12d5c7e560d161697878ea485433 (diff)
downloadpipeworks-76ebd0a0e1552e0b519716deca3d77e03d1b6b94.tar
pipeworks-76ebd0a0e1552e0b519716deca3d77e03d1b6b94.tar.gz
pipeworks-76ebd0a0e1552e0b519716deca3d77e03d1b6b94.tar.bz2
pipeworks-76ebd0a0e1552e0b519716deca3d77e03d1b6b94.tar.xz
pipeworks-76ebd0a0e1552e0b519716deca3d77e03d1b6b94.zip
devices.lua: make fountains functional under new flow logic using new neighbour output helper
-rw-r--r--devices.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/devices.lua b/devices.lua
index d12c84a..995f1da 100644
--- a/devices.lua
+++ b/devices.lua
@@ -598,7 +598,6 @@ end
-- fountainhead
--- TODO flow-logic-stub: fountainheads currently non-functional under new flow logic
local nodename_fountain_empty = "pipeworks:fountainhead"
minetest.register_node(nodename_fountain_empty, {
description = "Fountainhead",
@@ -668,6 +667,14 @@ minetest.register_node(nodename_fountain_loaded, {
drop = "pipeworks:fountainhead",
on_rotate = false
})
+new_flow_logic_register.simple(nodename_fountain_empty)
+new_flow_logic_register.simple(nodename_fountain_loaded)
+local fountain_min = 1
+local fountainfn = pipeworks.flowlogic.helpers.make_neighbour_output({{x=0, y=1, z=0}})
+new_flow_logic_register.output(nodename_fountain_empty, fountain_min, fountainfn)
+new_flow_logic_register.output(nodename_fountain_loaded, fountain_min, fountainfn)
+
+
minetest.register_alias("pipeworks:valve_off_loaded", "pipeworks:valve_off_empty")
minetest.register_alias("pipeworks:entry_panel", "pipeworks:entry_panel_empty")