From e489f0c714733719aa4756a234e6a7ccd0aeea8d Mon Sep 17 00:00:00 2001 From: Sirrobzeroone <44497598+sirrobzeroone@users.noreply.github.com> Date: Sat, 12 Jun 2021 13:51:26 +1000 Subject: [PATCH] Update network.lua --- elepower_papi/network.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/elepower_papi/network.lua b/elepower_papi/network.lua index 29d3e06..8a23e2a 100644 --- a/elepower_papi/network.lua +++ b/elepower_papi/network.lua @@ -139,7 +139,6 @@ local function give_node_power(pos, available) local capacity = ele.helpers.get_node_property(user_meta, pos, "capacity") local inrush = ele.helpers.get_node_property(user_meta, pos, "inrush") local storage = user_meta:get_int("storage") - local want = capacity - storage local total_add = 0 @@ -158,7 +157,7 @@ local function give_node_power(pos, available) storage = capacity end - return total_add, storage, want + return total_add, storage end @@ -232,7 +231,7 @@ minetest.register_abm({ for _,ndv in ipairs(users) do --ndv = pos table -- Check how much power a node wants and can get ie is it close to full charge - local user_gets, user_storage, user_want = give_node_power(ndv, (pw_supply - pw_demand)) + local user_gets, user_storage = give_node_power(ndv, (pw_supply - pw_demand)) -- Add the node_users wanting power to table for later power division if user_gets > 0 then