2014-12-24 23:42:36 +01:00
|
|
|
-- Load translation library if intllib is installed
|
|
|
|
|
|
|
|
if (minetest.get_modpath("intllib")) then
|
|
|
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
|
|
|
S = intllib.Getter(minetest.get_current_modname())
|
|
|
|
else
|
|
|
|
S = function ( s ) return s end
|
|
|
|
end
|
|
|
|
|
2014-12-29 21:47:55 +01:00
|
|
|
local modpath=minetest.get_modpath(minetest.get_current_modname())
|
2014-12-24 23:42:36 +01:00
|
|
|
|
2014-12-29 20:16:14 +01:00
|
|
|
dofile(modpath.."/register.lua")
|
2014-12-24 23:42:36 +01:00
|
|
|
|
2014-12-29 16:14:15 +01:00
|
|
|
rocks.noiseparams_layers = {
|
|
|
|
offset = 0,
|
|
|
|
scale = 1,
|
2015-01-11 11:16:16 +01:00
|
|
|
spread = {x=80, y=80, z=80},
|
|
|
|
octaves = 2,
|
|
|
|
persist = 0.7
|
2014-12-29 16:14:15 +01:00
|
|
|
}
|
|
|
|
|
2014-12-29 20:16:14 +01:00
|
|
|
dofile(modpath.."/mapgen.lua")
|
2015-02-08 17:14:01 +01:00
|
|
|
--dofile(modpath.."/testing.lua")
|
|
|
|
dofile(modpath.."/geologica.lua")
|
|
|
|
dofile(modpath.."/geologica_nv.lua")
|
2014-12-24 23:42:36 +01:00
|
|
|
|
2015-02-08 16:58:57 +01:00
|
|
|
print("[rocks] sorting layers")
|
|
|
|
|
|
|
|
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
|
2014-12-24 23:42:36 +01:00
|
|
|
|
|
|
|
print("[rocks] loaded.")
|