diff options
author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-01 18:34:55 +0100 |
---|---|---|
committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-01 18:34:55 +0100 |
commit | df3d54f58a7b00880f6631e309fba08fb769cd33 (patch) | |
tree | 6cf3d42bb4dc183871bab2899e0be0400055a254 | |
parent | de44593b414cf024d70027297236f582309daa09 (diff) | |
download | pipeworks-df3d54f58a7b00880f6631e309fba08fb769cd33.tar pipeworks-df3d54f58a7b00880f6631e309fba08fb769cd33.tar.gz pipeworks-df3d54f58a7b00880f6631e309fba08fb769cd33.tar.bz2 pipeworks-df3d54f58a7b00880f6631e309fba08fb769cd33.tar.xz pipeworks-df3d54f58a7b00880f6631e309fba08fb769cd33.zip |
move flowable registration for flow sensor to devices.lua near node definition
-rw-r--r-- | devices.lua | 8 | ||||
-rw-r--r-- | pipes.lua | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/devices.lua b/devices.lua index 4344c83..f4f2150 100644 --- a/devices.lua +++ b/devices.lua @@ -518,10 +518,15 @@ minetest.register_node(nodename_sensor_loaded, { mesecons = pipereceptor_on, on_rotate = pipeworks.fix_after_rotation }) +-- FIXME requires-directionality +new_flow_logic_register.simple(nodename_sensor_empty) +new_flow_logic_register.simple(nodename_sensor_loaded) + + -- tanks --- TODO: these don't currently do anything under the new flow logic. +-- TODO flow-logic-stub: these don't currently do anything under the new flow logic. for fill = 0, 10 do local filldesc="empty" local sgroups = {snappy=3, pipe=1, tankfill=fill+1} @@ -592,6 +597,7 @@ 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", @@ -188,9 +188,8 @@ if REGISTER_COMPATIBILITY then }) end --- appropriate registration for both old and new flow logic follows --- FIXME/TODO: these aren't really "simple", they have directionality. + local valve_on = "pipeworks:valve_on_empty" local valve_off = "pipeworks:valve_off_empty" local entry_panel_empty = "pipeworks:entry_panel_empty" @@ -200,7 +199,6 @@ table.insert(pipes_empty_nodenames, valve_on) table.insert(pipes_empty_nodenames, valve_off) table.insert(pipes_empty_nodenames, entry_panel_empty) table.insert(pipes_empty_nodenames, flow_sensor_empty) -new_flow_logic_register.simple(flow_sensor_empty) local valve_on_loaded = "pipeworks:valve_on_loaded" local entry_panel_loaded = "pipeworks:entry_panel_loaded" @@ -208,7 +206,6 @@ local flow_sensor_loaded = "pipeworks:flow_sensor_loaded" table.insert(pipes_full_nodenames, valve_on_loaded) table.insert(pipes_full_nodenames, entry_panel_loaded) table.insert(pipes_full_nodenames, flow_sensor_loaded) -new_flow_logic_register.simple(flow_sensor_loaded) pipeworks.pipes_full_nodenames = pipes_full_nodenames pipeworks.pipes_empty_nodenames = pipes_empty_nodenames |