generators: move terrain and spike noise to init

This commit is contained in:
cora 2022-03-25 16:22:48 +01:00
parent 8a82953e5d
commit bc34d97699
2 changed files with 29 additions and 31 deletions

View File

@ -39,3 +39,32 @@ minetest.register_chatcommand("mmtp",{privs={debug=true},func=function(name,para
p:set_pos(vector.new(lp.x,ty,lp.z)) p:set_pos(vector.new(lp.x,ty,lp.z))
return true, "tped to layer "..param return true, "tped to layer "..param
end}) end})
-- 3D noise
multi_map.register_global_3dmap(
"terrain", {
offset = 0,
scale = 1,
spread = {x=384, y=192, z=384},
seed = 5900033,
octaves = 5,
persist = 0.63,
lacunarity = 2.0,
}
)
-- 2D noise
multi_map.register_global_2dmap(
"spike", {
offset = 0,
scale = 1,
spread = {x=128, y=128, z=128},
seed = -188900,
octaves = 3,
persist = 0.5,
lacunarity = 2.0,
flags = "noeased"
}
)

View File

@ -27,37 +27,6 @@ local UNDERFAC = 0.0001
local UNDEROFF = -0.2 local UNDEROFF = -0.2
local LUXCHA = 1 / 9 ^ 3 local LUXCHA = 1 / 9 ^ 3
-- Noise parameters
-- 3D noise
multi_map.register_global_3dmap(
"terrain", {
offset = 0,
scale = 1,
spread = {x=384, y=192, z=384},
seed = 5900033,
octaves = 5,
persist = 0.63,
lacunarity = 2.0,
}
)
-- 2D noise
multi_map.register_global_2dmap(
"spike", {
offset = 0,
scale = 1,
spread = {x=128, y=128, z=128},
seed = -188900,
octaves = 3,
persist = 0.5,
lacunarity = 2.0,
flags = "noeased"
}
)
-- Stuff -- Stuff
local floatper = math.pi / FLOATPER local floatper = math.pi / FLOATPER