From bc34d9769907e88f662c160d55ab5ff674ebe818 Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 25 Mar 2022 16:22:48 +0100 Subject: [PATCH] generators: move terrain and spike noise to init --- multi_map_generators/init.lua | 29 +++++++++++++++++++++++++ multi_map_generators/mmgen_levels.lua | 31 --------------------------- 2 files changed, 29 insertions(+), 31 deletions(-) diff --git a/multi_map_generators/init.lua b/multi_map_generators/init.lua index 3f7bb94..0c7b4af 100644 --- a/multi_map_generators/init.lua +++ b/multi_map_generators/init.lua @@ -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)) return true, "tped to layer "..param 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" + } +) diff --git a/multi_map_generators/mmgen_levels.lua b/multi_map_generators/mmgen_levels.lua index d9e3e9a..b106c6c 100644 --- a/multi_map_generators/mmgen_levels.lua +++ b/multi_map_generators/mmgen_levels.lua @@ -27,37 +27,6 @@ local UNDERFAC = 0.0001 local UNDEROFF = -0.2 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 local floatper = math.pi / FLOATPER