Fix stupid power transfer calculation error

This commit is contained in:
Evert Prants 2018-09-14 14:41:55 +03:00
parent a143cc6e11
commit 7f281eadf0
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
1 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ local function give_node_power(pos, available)
if available >= inrush then
total_add = inrush
elseif available < inrush then
total_add = inrush - available
total_add = available
end
if total_add + storage > capacity then
@ -225,7 +225,7 @@ minetest.register_abm({
-- Give power to users
for _,ndv in ipairs(users) do
if pw_demand >= pw_supply then
if pw_demand > pw_supply then
break
end