Start fluid pump on neighbor update

This commit is contained in:
Evert Prants 2018-12-13 01:42:57 +02:00
parent c1981030c3
commit cdc33392c6
No known key found for this signature in database
GPG Key ID: 1688DA83D222D0B5

@ -10,7 +10,14 @@ function fluid_lib.register_extractor_node(nodename, nodedef)
nodedef.groups["fluid_transport_source"] = 1
nodedef.paramtype2 = "facedir"
nodedef.legacy_facedir_simple = true
nodedef.on_timer = fluid_lib.transfer_timer_tick
nodedef.node_io_on_neighbor_update = function (pos, node, side)
local t = minetest.get_node_timer(pos)
if not t:is_started() then
t:start(1.0)
end
end
local orig_construct = nodedef.on_construct
nodedef.on_construct = function (pos)