Differences From
Artifact [1330514938]:
68 68 for _,v in pairs(checked) do
69 69 if vector.equals(pos,v) then return true end
70 70 end
71 71 return false
72 72 end
73 73 local i,stack = 1,{startpoint} repeat
74 74 local pos = stack[i]
75 - local n = minetest.get_node(pos).name
76 - if n == 'ignore' then
77 - minetest.load_area(pos)
78 - n = minetest.get_node(pos).name
79 - end
80 - if sorcery.lib.tbl.has(names, n) then -- match found
75 + local n = sorcery.lib.node.force(pos).name
76 + if sorcery.lib.tbl.has(names, n, function(check,against)
77 + return sorcery.lib.item.groupmatch(against,check)
78 + end) then -- match found
81 79 -- record the find
82 80 nodes[pos] = n
83 81 if positions[n] then positions[n][#positions[n]] = pos
84 82 else positions[n] = {pos} end
85 83
86 84 -- check selected neighbors to see if any need scanning
87 85 for _,d in pairs(directions) do
................................................................................
107 105 end
108 106 fn(sum, n)
109 107 end
110 108 end;
111 109
112 110 force = function(pos,preload_for)
113 111 local n = minetest.get_node_or_nil(pos)
112 + if preload_for then sorcery.lib.node.preload(pos,preload_for) end
114 113 if n then return n end
115 - if preload_for then
116 - sorcery.lib.node.preload(pos,preload_for)
117 - else
118 - minetest.load_area(pos)
119 - end
114 +
115 + minetest.load_area(pos)
120 116 return minetest.get_node(pos)
121 117 end;
122 118
123 119 -- when items have already been removed; notify cannot be relied on
124 120 -- to reach the entire network; this function accounts for the gap
125 121 notifyneighbors = function(pos)
126 122 sorcery.lib.node.forneighbor(pos, sorcery.ley.txofs, function(pos,node)