From 21e044478e259efa202dce2c2e82afc342f07b90 Mon Sep 17 00:00:00 2001 From: SmallJoker <mk939@ymail.com> Date: Sat, 26 Nov 2022 23:25:33 +0100 Subject: [PATCH] Fix battery box charging issues caused by out of sync functions --- technic/machines/register/battery_box.lua | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/technic/machines/register/battery_box.lua b/technic/machines/register/battery_box.lua index 86f340f..190ddbf 100644 --- a/technic/machines/register/battery_box.lua +++ b/technic/machines/register/battery_box.lua @@ -192,10 +192,10 @@ end local run = function(pos, node) - local below = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}) - local meta = minetest.get_meta(pos) + local meta = minetest.get_meta(pos) + local network_id = tonumber(meta:get_string(tier.."_network")) - if not technic.is_tier_cable(below.name, tier) then + if not technic.networks[network_id] then meta:set_string("infotext", S("%s Battery Box Has No Network"):format(tier)) return end -- Gitblit v1.8.0