diff options
author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-19 13:05:16 +0100 |
---|---|---|
committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-19 13:05:16 +0100 |
commit | 9df0ec7edb55ba443acc68df9ed63fdd53c66bfa (patch) | |
tree | 9cc6bb59a684df55155d69fc1b1ec2c8c181e22c | |
parent | fd4bd8eadcdbd12d119b69b591bfe66a238f14f8 (diff) | |
download | pipeworks-9df0ec7edb55ba443acc68df9ed63fdd53c66bfa.tar pipeworks-9df0ec7edb55ba443acc68df9ed63fdd53c66bfa.tar.gz pipeworks-9df0ec7edb55ba443acc68df9ed63fdd53c66bfa.tar.bz2 pipeworks-9df0ec7edb55ba443acc68df9ed63fdd53c66bfa.tar.xz pipeworks-9df0ec7edb55ba443acc68df9ed63fdd53c66bfa.zip |
devices.lua: convert entry panel and valve to horizontal rotation flowable class
-rw-r--r-- | devices.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/devices.lua b/devices.lua index 7dad816..093137e 100644 --- a/devices.lua +++ b/devices.lua @@ -215,8 +215,7 @@ for s in ipairs(states) do -- only register flow logic for the "on" ABM. -- this means that the off state automatically blocks flow by not participating in the balancing operation. if states[s] ~= "off" then - -- FIXME: this still a simple device, directionality not honoured - new_flow_logic_register.simple(nodename_valve_empty) + new_flow_logic_register.directional_horizonal_rotate(nodename_valve_empty) end end @@ -264,7 +263,7 @@ minetest.register_node(nodename_valve_loaded, { -- right-clicking a "loaded" valve (becoming an off valve) then turning it on again will yield a on-but-empty valve, -- but the flow logic will still function. -- thus under new_flow_logic this serves as a kind of migration. -new_flow_logic_register.simple(nodename_valve_loaded) +new_flow_logic_register.directional_horizonal_rotate(nodename_valve_loaded) -- grating @@ -438,10 +437,9 @@ minetest.register_node(nodename_panel_loaded, { drop = "pipeworks:entry_panel_empty", on_rotate = pipeworks.fix_after_rotation }) --- FIXME requires-directionality -- TODO: AFAIK the two panels have no visual difference, so are redundant under new flow logic - alias? -new_flow_logic_register.simple(nodename_panel_empty) -new_flow_logic_register.simple(nodename_panel_loaded) +new_flow_logic_register.directional_horizonal_rotate(nodename_panel_empty) +new_flow_logic_register.directional_horizonal_rotate(nodename_panel_loaded) |