Tree analysis.

This commit is contained in:
Duane 2016-07-22 02:32:46 -05:00
parent 5dba3b99ec
commit d5c3a8f971
2 changed files with 20 additions and 1 deletions

View file

@ -280,6 +280,16 @@ minetest.register_craft({
local tree_noise_1 = {offset = 0, scale = 1, seed = 7227, spread = {x = 10, y = 10, z = 10}, octaves = 3, persist = 1, lacunarity = 2}
local wood_noise = {offset = 0, scale = 1, seed = -4640, spread = {x = 32, y = 32, z = 32}, octaves = 4, persist = 0.7, lacunarity = 2}
--local totals = {}
--local interest = {}
--interest['fun_caves:tree'] = true
--interest['fun_caves:ironwood'] = true
--interest['fun_caves:diamondwood'] = true
--interest['fun_caves:bark'] = true
--interest['fun_caves:weightless_water'] = true
--interest['fun_caves:sap'] = true
--interest['fun_caves:tree_mineral'] = true
fun_caves.treegen = function(minp, maxp, data, p2data, area, node)
if not (minp and maxp and data and p2data and area and node and type(data) == 'table' and type(p2data) == 'table') then
@ -381,11 +391,20 @@ fun_caves.treegen = function(minp, maxp, data, p2data, area, node)
end
end
--totals[data[ivm]] = totals[data[ivm]] and totals[data[ivm]] + 1 or 1
ivm = ivm + area.ystride
index3d = index3d + csize.x
end
end
end
--for key, total in pairs(totals) do
-- local name = minetest.get_name_from_content_id(key)
-- if interest[name] then
-- print(name, total)
-- end
--end
return write
end