mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-24 09:50:31 +01:00
always set the EU level
don't wait for production = 0. (if water is removed, that causes phantom output)
This commit is contained in:
parent
b67bca1277
commit
72c536c04e
@ -50,9 +50,7 @@ local run = function(pos, node)
|
|||||||
eu_supply = math.min(35 * water_flow, max_output)
|
eu_supply = math.min(35 * water_flow, max_output)
|
||||||
production_level = math.floor(100 * eu_supply / max_output)
|
production_level = math.floor(100 * eu_supply / max_output)
|
||||||
|
|
||||||
if production_level > 0 then
|
meta:set_int("LV_EU_supply", eu_supply)
|
||||||
meta:set_int("LV_EU_supply", eu_supply)
|
|
||||||
end
|
|
||||||
|
|
||||||
meta:set_string("infotext",
|
meta:set_string("infotext",
|
||||||
S("Hydro %s Generator"):format("LV").." ("..production_level.."%)")
|
S("Hydro %s Generator"):format("LV").." ("..production_level.."%)")
|
||||||
|
Loading…
Reference in New Issue
Block a user