1
0
mirror of git://repo.or.cz/rocks.git synced 2024-11-18 00:08:35 +01:00
This commit is contained in:
Tomáš Brada 2015-02-08 21:49:40 +01:00
parent 6d5bfbb42d
commit 9dfb45a978
2 changed files with 5 additions and 2 deletions

View File

@ -29,11 +29,14 @@ dofile(modpath.."/geologicaStrata.lua")
dofile(modpath.."/geologicaVeins.lua") dofile(modpath.."/geologicaVeins.lua")
minetest.register_on_mapgen_init(function(mapgen_params) minetest.register_on_mapgen_init(function(mapgen_params)
print("[rocks] sorting layers ("..#rocks.layers_name..")")
for i,d in pairs(rocks.layers_name) do table.insert(rocks.layers,d) end for i,d in pairs(rocks.layers_name) do table.insert(rocks.layers,d) end
table.sort(rocks.layers,function(a,b) table.sort(rocks.layers,function(a,b)
return a.height<b.height return a.height<b.height
end) end)
-- todo: disable caves and ores
print("[rocks] mapgen initalized ("..#rocks.layers.." layers)")
end) end)

View File

@ -54,7 +54,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
end end
-- --
print("[rocks] gen2 "..os.clock()-timebefore.." #layers="..#avl.." minp.y="..minp.y.." maxp.y"..maxp.y) print("[rocks] gen2 "..os.clock()-timebefore.." #layers="..#avl.." minp.y="..minp.y.." maxp.y="..maxp.y)
for lh,ld in ipairs(avl) do for lh,ld in ipairs(avl) do
print(" "..lh.."->"..ld.name.." top="..ld.height) print(" "..lh.."->"..ld.name.." top="..ld.height)
for vn,vd in pairs(ld.veins) do for vn,vd in pairs(ld.veins) do