Fix battery box charging issues caused by out of sync functions

This code should be merged in the future to avoid such issues.
This commit is contained in:
SmallJoker
2022-11-26 23:25:27 +01:00
parent 521c0b74bb
commit 21e044478e
2 changed files with 4 additions and 3 deletions

View File

@ -67,7 +67,7 @@ local function clear_networks(pos)
local tier = network.tier
-- Actually add it to the (cached) network
-- This is similar to check_node_subp
-- !! IMPORTANT: ../switching_station.lua -> check_node_subp() must be kept in sync
technic.cables[minetest.hash_node_position(pos)] = network_id
pos.visited = 1
if technic.is_tier_cable(node.name, tier) then
@ -76,7 +76,7 @@ local function clear_networks(pos)
elseif technic.machines[tier][node.name] then
-- Found a machine
local eu_type = technic.machines[tier][node.name]
meta:set_string(tier.."_network", string.format("%X", network_id))
meta:set_string(tier.."_network", string.format("%.20g", network_id))
if eu_type == technic.producer then
table.insert(network.PR_nodes, pos)
elseif eu_type == technic.receiver then