From 6154a04c00d7650664b78e2bca37631ae3778411 Mon Sep 17 00:00:00 2001
From: David Leal <halfpacho@gmail.com>
Date: Wed, 24 Jun 2020 21:14:04 +0200
Subject: [PATCH] Remove node_ownership support, cleanup (#560)

---
 technic/machines/MV/hydro_turbine.lua |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/technic/machines/MV/hydro_turbine.lua b/technic/machines/MV/hydro_turbine.lua
index 36aac91..0d4904c 100644
--- a/technic/machines/MV/hydro_turbine.lua
+++ b/technic/machines/MV/hydro_turbine.lua
@@ -1,5 +1,5 @@
 -- A Hydro Turbine produces MV EUs by exploiting flowing water across it
--- It is a MV EU supplyer and fairly high yield (max 1800EUs)
+-- It is a MV EU supplier and fairly high yield (max 1800EUs)
 
 local S = technic.getter
 
@@ -18,20 +18,20 @@
 
 local function get_water_flow(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
 	end
 	return 0
 end
 
 ---
--- 10 times better than LV hydro because of 2 extra water mills and 4 stainless steel, a transformer and whatnot ;P. 
+-- 10 times better than LV hydro because of 2 extra water mills and 4 stainless steel, a transformer and whatnot ;P.
 -- Man hydro turbines are tough and long lasting. So, give it some value :)
 local run = function(pos, node)
 	local meta             = minetest.get_meta(pos)
 	local water_flow       = 0
-	local production_level = 0
-	local eu_supply        = 0
+	local production_level
+	local eu_supply
 	local max_output       = 40 * 45 -- Generates 1800EU/s
 
 	local positions = {

--
Gitblit v1.8.0