From 2777d32043149c45484d49f0f474e06e9bd42da1 Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Mon, 28 Jan 2019 14:09:51 +0200 Subject: [PATCH] oops --- elepower_machines/machines/wind_turbine.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/elepower_machines/machines/wind_turbine.lua b/elepower_machines/machines/wind_turbine.lua index f4f18f9..4e014f4 100644 --- a/elepower_machines/machines/wind_turbine.lua +++ b/elepower_machines/machines/wind_turbine.lua @@ -77,10 +77,14 @@ function ele.register_wind_generator(nodename, nodedef) break end + pow_buffer.usage = wind + if pow_buffer.storage + pow_buffer.usage > pow_buffer.capacity then + break + end + status = "Active" refresh = true - pow_buffer.usage = wind pow_buffer.storage = pow_buffer.storage + pow_buffer.usage break end