mirror of
git://repo.or.cz/rocks.git
synced 2024-11-15 23:10:40 +01:00
Added sorting on mapgen init. Split geologica to submodules.
This commit is contained in:
parent
f5c693c1de
commit
6d5bfbb42d
|
@ -122,3 +122,5 @@ minetest.register_node( "rocks:andesite", {
|
|||
is_ground_content = true, sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
rocks.register_layer( "andesite",{ gain=8, height=10, limit=2, seed=4 }, "rocks:andesite")
|
||||
|
||||
print("[rocks/geologicaLayers] loaded.")
|
|
@ -34,4 +34,4 @@ rocks.register_vein("limestone",{
|
|||
-- Dolomite Sed med in Rhyolite, Andesite in mountains
|
||||
-- Quartzite MM/contact vhard sandstone
|
||||
|
||||
|
||||
print("[rocks/geologicaStrata] loaded.")
|
11
geologicaVeins.lua
Normal file
11
geologicaVeins.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
local CcHard=3
|
||||
local CcStrong=3
|
||||
local CcMed=3
|
||||
local CcSoft=3
|
||||
|
||||
--
|
||||
-- Veins
|
||||
--
|
||||
|
||||
|
||||
print("[rocks/geologicaVeins] loaded.")
|
25
init.lua
25
init.lua
|
@ -21,18 +21,19 @@ rocks.noiseparams_layers = {
|
|||
|
||||
dofile(modpath.."/mapgen.lua")
|
||||
--dofile(modpath.."/testing.lua")
|
||||
dofile(modpath.."/geologica.lua")
|
||||
dofile(modpath.."/geologica_nv.lua")
|
||||
|
||||
print("[rocks] sorting layers")
|
||||
print("[rocks] core loaded.")
|
||||
|
||||
dofile(modpath.."/geologicaLayers.lua")
|
||||
dofile(modpath.."/geologicaStrata.lua")
|
||||
dofile(modpath.."/geologicaVeins.lua")
|
||||
|
||||
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
|
||||
table.sort(rocks.layers,function(a,b)
|
||||
return a.height<b.height
|
||||
end)
|
||||
|
||||
for i,d in pairs(rocks.layers_name) do table.insert(rocks.layers,d) end
|
||||
table.sort(rocks.layers,function(a,b)
|
||||
return a.height<b.height
|
||||
end)
|
||||
|
||||
for i,d in pairs(rocks.layers) do
|
||||
print(" init,layer "..i.." "..minetest.serialize(d))
|
||||
end
|
||||
|
||||
print("[rocks] loaded.")
|
||||
|
|
Loading…
Reference in New Issue
Block a user