diff options
author | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-19 13:35:31 +0100 |
---|---|---|
committer | thetaepsilon-gamedev <thetaepsilon-gamedev@noreply.users.github.com> | 2017-10-19 13:35:31 +0100 |
commit | b2b29a1737c4bd86e397bb496d06aebd8129def7 (patch) | |
tree | 2d5001e6ed922fe881d3b414c79bb8745b428659 /devices.lua | |
parent | 9df0ec7edb55ba443acc68df9ed63fdd53c66bfa (diff) |
pressure logic: rewrite callbacks for horizontal rotation flowables to support singular and double-ended devices
Diffstat (limited to 'devices.lua')
-rw-r--r-- | devices.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/devices.lua b/devices.lua index 093137e..cb1a6d1 100644 --- a/devices.lua +++ b/devices.lua @@ -215,7 +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 - new_flow_logic_register.directional_horizonal_rotate(nodename_valve_empty) + new_flow_logic_register.directional_horizonal_rotate(nodename_valve_empty, true) end end @@ -263,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.directional_horizonal_rotate(nodename_valve_loaded) +new_flow_logic_register.directional_horizonal_rotate(nodename_valve_loaded, true) -- grating @@ -438,8 +438,8 @@ minetest.register_node(nodename_panel_loaded, { on_rotate = pipeworks.fix_after_rotation }) -- TODO: AFAIK the two panels have no visual difference, so are redundant under new flow logic - alias? -new_flow_logic_register.directional_horizonal_rotate(nodename_panel_empty) -new_flow_logic_register.directional_horizonal_rotate(nodename_panel_loaded) +new_flow_logic_register.directional_horizonal_rotate(nodename_panel_empty, true) +new_flow_logic_register.directional_horizonal_rotate(nodename_panel_loaded, true) @@ -521,8 +521,8 @@ minetest.register_node(nodename_sensor_loaded, { mesecons = pipereceptor_on, on_rotate = pipeworks.fix_after_rotation }) -new_flow_logic_register.directional_horizonal_rotate(nodename_sensor_empty) -new_flow_logic_register.directional_horizonal_rotate(nodename_sensor_loaded) +new_flow_logic_register.directional_horizonal_rotate(nodename_sensor_empty, true) +new_flow_logic_register.directional_horizonal_rotate(nodename_sensor_loaded, true) -- activate flow sensor at roughly half the pressure pumps drive pipes local sensor_pressure_set = { { nodename_sensor_empty, 0.0 }, { nodename_sensor_loaded, 1.0 } } new_flow_logic_register.transition_simple_set(sensor_pressure_set, { mesecons=pipeworks.mesecons_rules }) |