This commit is contained in:
Evert Prants 2019-01-28 14:09:51 +02:00
parent 6b1d222d1d
commit 2777d32043
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -77,10 +77,14 @@ function ele.register_wind_generator(nodename, nodedef)
break break
end end
pow_buffer.usage = wind
if pow_buffer.storage + pow_buffer.usage > pow_buffer.capacity then
break
end
status = "Active" status = "Active"
refresh = true refresh = true
pow_buffer.usage = wind
pow_buffer.storage = pow_buffer.storage + pow_buffer.usage pow_buffer.storage = pow_buffer.storage + pow_buffer.usage
break break
end end