mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-22 05:42:33 +01:00
make sure MV turbines only turn on in response to *flowing* water
This commit is contained in:
parent
e1a71a8fb0
commit
8ebc1de29c
@ -18,7 +18,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
local function get_water_flow(pos)
|
local function get_water_flow(pos)
|
||||||
local node = minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
if minetest.get_item_group(node.name, "water") == 3 then
|
if minetest.get_item_group(node.name, "water") == 3 and string.find(node.name, "flowing") then
|
||||||
return node.param2 -- returns approx. water flow, if any
|
return node.param2 -- returns approx. water flow, if any
|
||||||
end
|
end
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user