Differences From
Artifact [f2e6b0cbe1]:
181 181 return true
182 182 end;
183 183
184 184 tree_is_live = function(pos, checklight) -- VERY EXPENSIVE FUNCTION
185 185 -- this is going to require some explanation.
186 186 --
187 187 -- for various purposes, we want to be able to tell the difference between
188 - -- a tree that has grown naturally from the grown vs. a couple of trunk nodes
188 + -- a tree that has grown naturally from the ground vs. a couple of trunk nodes
189 189 -- that the player has jammed together, even if she's built her own counterfeit
190 190 -- tree. unfortunately, mtg provides no easy way to do this. the only
191 191 -- difference between a cluster of trunk blocks and a real tree is that the
192 192 -- real tree will have a specific kind of leaves attached with their param2
193 193 -- set to 1 so that they can be distinguished for the purpose of leaf cleaning.
194 194 -- so to check a tree's state, we need to amass its whole potential body, and if
195 195 -- there are legitimate leaves connected, then we identify it as a legit tree.
................................................................................
410 410 for _,p in pairs(n) do
411 411 local sum = vector.add(pos, p)
412 412 local n = minetest.get_node(sum)
413 413 if n.name == 'ignore' then
414 414 minetest.load_area(sum)
415 415 n = minetest.get_node(sum)
416 416 end
417 - fn(sum, n)
417 + if fn(sum, n) == false then break end
418 418 end
419 419 end;
420 420
421 421 amass = amass;
422 422
423 423 force = force;
424 424