From 521c0b74bba5dd73cf7c0a59fde4a018813e835d Mon Sep 17 00:00:00 2001 From: SmallJoker <mk939@ymail.com> Date: Thu, 24 Nov 2022 21:49:20 +0100 Subject: [PATCH] Fix battery box charging on Windows --- technic/machines/switching_station.lua | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/technic/machines/switching_station.lua b/technic/machines/switching_station.lua index 907a6d1..e97e761 100644 --- a/technic/machines/switching_station.lua +++ b/technic/machines/switching_station.lua @@ -134,7 +134,8 @@ --dprint(name.." is a "..machines[name]) local meta = minetest.get_meta(pos) -- Normal tostring() does not have enough precision, neither does meta:set_int() - meta:set_string(network.tier.."_network", string.format("%X", network_id)) + -- Bug: Cannot use hexadecimal notation for compression (LuaJIT Windows bug, #911) + meta:set_string(network.tier.."_network", string.format("%.20g", network_id)) if eu_type == technic.producer then add_network_node(network.PR_nodes, pos, network_id) @@ -355,6 +356,8 @@ BA_eu_supply = BA_eu_supply + meta1:get_int(eu_supply_str) BA_eu_demand = BA_eu_demand + meta1:get_int(eu_demand_str) end + -- Expose value for the supply converter + meta:set_int("ba_demand", BA_eu_demand) --dprint("Total BA supply:"..BA_eu_supply) --dprint("Total BA demand:"..BA_eu_demand) -- Gitblit v1.8.0