mirror of
git://repo.or.cz/rocks.git
synced 2025-01-04 07:10:28 +01:00
Experiments with layers.
This commit is contained in:
parent
7c7b7715bc
commit
945be335d8
@ -25,23 +25,16 @@ minetest.clear_registered_ores()
|
|||||||
|
|
||||||
local modpath=minetest.get_modpath(minetest.get_current_modname())
|
local modpath=minetest.get_modpath(minetest.get_current_modname())
|
||||||
|
|
||||||
dofile(modpath.."/sed.lua")
|
--dofile(modpath.."/pipes.lua")
|
||||||
dofile(modpath.."/ign.lua")
|
--dofile(modpath.."/veins.lua")
|
||||||
dofile(modpath.."/skarn.lua")
|
dofile(modpath.."/layers.lua")
|
||||||
dofile(modpath.."/pegmatite.lua")
|
|
||||||
dofile(modpath.."/gensed.lua")
|
|
||||||
dofile(modpath.."/pipes.lua")
|
|
||||||
dofile(modpath.."/veins.lua")
|
|
||||||
|
|
||||||
minetest.register_on_generated(function(minp,maxp,seed)
|
minetest.register_on_generated(function(minp,maxp,seed)
|
||||||
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
|
||||||
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
|
local area = VoxelArea:new{MinEdge=emin, MaxEdge=emax}
|
||||||
local pr=PseudoRandom(seed)
|
local pr=PseudoRandom(seed)
|
||||||
rocksl.gensed(minp,maxp,seed,vm,area)
|
rocksl.genlayers(minp,maxp,seed,vm,area)
|
||||||
--rocksl.genign
|
vm:write_to_map()
|
||||||
rocksl.genvein(minp,maxp,pr,vm,area)
|
|
||||||
for _,pipe in pairs(rocks.pipes) do rocksl.genpipe(minp,maxp,pr,vm,area,pipe) end
|
|
||||||
vm:write_to_map(data)
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_mapgen_init(function(mapgen_params)
|
minetest.register_on_mapgen_init(function(mapgen_params)
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
-- experimental fast vein generator
|
-- experimental fast vein generator
|
||||||
|
|
||||||
|
rocks.veins={}
|
||||||
|
|
||||||
|
table.insert(rocks.veins,{
|
||||||
|
scarcity=80,
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
rocksl.genvein=function(minp,maxp,pr,vm,area)
|
rocksl.genvein=function(minp,maxp,pr,vm,area)
|
||||||
local t1 = os.clock()
|
local t1 = os.clock()
|
||||||
|
Loading…
Reference in New Issue
Block a user