devices.lua: make flow sensor use the horizontally rotating flowable class

This commit is contained in:
thetaepsilon-gamedev 2017-10-19 12:30:28 +01:00
parent 0913098a9d
commit fd4bd8eadc

View File

@ -523,9 +523,8 @@ minetest.register_node(nodename_sensor_loaded, {
mesecons = pipereceptor_on, mesecons = pipereceptor_on,
on_rotate = pipeworks.fix_after_rotation on_rotate = pipeworks.fix_after_rotation
}) })
-- FIXME requires-directionality new_flow_logic_register.directional_horizonal_rotate(nodename_sensor_empty)
new_flow_logic_register.simple(nodename_sensor_empty) new_flow_logic_register.directional_horizonal_rotate(nodename_sensor_loaded)
new_flow_logic_register.simple(nodename_sensor_loaded)
-- activate flow sensor at roughly half the pressure pumps drive pipes -- 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 } } 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 }) new_flow_logic_register.transition_simple_set(sensor_pressure_set, { mesecons=pipeworks.mesecons_rules })