Differences From
Artifact [3d99ab5529]:
211 211 --
212 212 -- UPDATE: in pratice this is way too expensive to be functional, and causes servers to hang. we're replacing it with a simpler version
213 213
214 214 local treetype = force(pos).name
215 215 if minetest.get_item_group(treetype, 'tree') == 0 then -- sir this is not a tree
216 216 return nil -- 無
217 217 end
218 - local treedef = sorcery.lib.tbl.select(sorcery.data.trees, 'node', treetype)
218 + local treedef = sorcery.lib.tbl.select(sorcery.data.trees, function(ent)
219 + return sorcery.lib.tbl.strmatch(ent.node, treetype)
220 + end)
219 221 local leaftype = treedef and treedef.leaves or nil
220 222 if not leaftype then return false end
221 223
222 224 local uppermost, lowermost
223 225 local found_leaves = false
224 226
225 227 local treemap, treenodes = amass(pos,function(node, where)