Skip to content

Commit

Permalink
Defined clear_networks before clear_network because it is needed in t…
Browse files Browse the repository at this point in the history
…he function.
  • Loading branch information
SomeName42 committed Nov 17, 2024
1 parent 27df5e5 commit 234a9e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion technic/machines/register/cables.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ local function check_connections(pos)
return connections
end

local clear_networks

local function clear_network(net)
for _,v in pairs(technic.networks[net].all_nodes) do
local pos1 = minetest.hash_node_position(v)
Expand All @@ -62,7 +64,7 @@ local function clear_network(net)
end
end

local function clear_networks(pos)
clear_networks = function(pos)
local node = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
local placed = node.name ~= "air"
Expand Down

0 comments on commit 234a9e9

Please sign in to comment.