mirror of
https://github.com/sirrobzeroone/elepower.git
synced 2024-08-20 12:54:05 +02:00
Fix stupid power transfer calculation error
This commit is contained in:
parent
a143cc6e11
commit
7f281eadf0
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user