mirror of
git://repo.or.cz/rocks.git
synced 2024-11-18 00:08:35 +01:00
Fix.
This commit is contained in:
parent
6d5bfbb42d
commit
9dfb45a978
5
init.lua
5
init.lua
@ -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)
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user