Skip to content

Commit d469c2a

Browse files
authored
Fix use of Voxel manipulator to force loading of nodes (#408)
1 parent 379bedc commit d469c2a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

technic/machines/network.lua

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,11 @@ minetest.register_on_mods_loaded(function()
589589
end
590590
end)
591591

592-
local function run_nodes(list, vm, run_stage, network)
592+
local function run_nodes(list, run_stage, network)
593593
for _, pos in ipairs(list) do
594594
local node = minetest.get_node_or_nil(pos)
595595
if not node then
596-
vm:read_from_map(pos, pos)
596+
minetest.load_area(pos, pos)
597597
node = minetest.get_node_or_nil(pos)
598598
end
599599
if node and node.name and node_technic_run[node.name] then
@@ -635,10 +635,9 @@ function technic.network_run(network_id)
635635
network.BA_count_active = 0
636636
network.BA_charge_active = 0
637637

638-
local vm = VoxelManip()
639-
run_nodes(PR_nodes, vm, technic.producer, network)
640-
run_nodes(RE_nodes, vm, technic.receiver, network)
641-
run_nodes(BA_nodes, vm, technic.battery, network)
638+
run_nodes(PR_nodes, technic.producer, network)
639+
run_nodes(RE_nodes, technic.receiver, network)
640+
run_nodes(BA_nodes, technic.battery, network)
642641

643642
-- Strings for the meta data
644643
local eu_demand_str = network.tier.."_EU_demand"

0 commit comments

Comments
 (0)