1 minetest
.log("info","[rocks] mod initializing")
3 -- Load translation library if intllib is installed
5 if (minetest
.get_modpath("intllib")) then
6 dofile(minetest
.get_modpath("intllib").."/intllib.lua")
7 S
= intllib
.Getter(minetest
.get_current_modname())
9 S
= function ( s
) return s
end
15 rocksl
.print=function(text
)
16 minetest
.log("info","/rocks "..text
)
19 rocksl
.seedprng
=PseudoRandom(763)
20 rocksl
.GetNextSeed
=function()
21 return rocksl
.seedprng
:next()
24 minetest
.clear_registered_ores()
26 local modpath
=minetest
.get_modpath(minetest
.get_current_modname())
28 --dofile(modpath.."/pipes.lua")
29 --dofile(modpath.."/veins.lua")
30 dofile(modpath
.."/layers.lua")
32 minetest
.register_on_generated(function(minp
,maxp
,seed
)
33 local vm
, emin
, emax
= minetest
.get_mapgen_object("voxelmanip")
34 local area
= VoxelArea
:new
{MinEdge
=emin
, MaxEdge
=emax
}
35 local pr
=PseudoRandom(seed
)
36 rocksl
.genlayers(minp
,maxp
,seed
,vm
,area
)
40 minetest
.register_on_mapgen_init(function(mapgen_params
)
41 -- todo: disable caves and ores