mirror of
https://github.com/minetest-mods/technic.git
synced 2024-12-24 01:40:29 +01:00
Fix battery box charging on Windows
This commit is contained in:
parent
aad1b2875a
commit
521c0b74bb
@ -193,7 +193,7 @@ function technic.register_battery_box(data)
|
||||
|
||||
local run = function(pos, node)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local network_id = tonumber(meta:get_string(tier.."_network"), 16)
|
||||
local network_id = tonumber(meta:get_string(tier.."_network"))
|
||||
|
||||
if not technic.networks[network_id] then
|
||||
meta:set_string("infotext", S("%s Battery Box Has No Network"):format(tier))
|
||||
|
@ -134,7 +134,8 @@ local check_node_subp = function(network, pos, machines, sw_pos, from_below, net
|
||||
--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)
|
||||
|
Loading…
Reference in New Issue
Block a user