MapGen: Added the ability to limit cave generation regionally. close #15

This commit is contained in:
Van
2026-01-21 19:05:00 +03:00
parent 0952e96452
commit fc90ae54c0
3 changed files with 92 additions and 47 deletions

View File

@@ -169,18 +169,18 @@ for _, c in ipairs({'landscape', 'temp', 'humidity'}) do
})--]]
end
mapGenerator:register2DPeaksFromFile('midgard', 'map.ff', 32,{x=0, y=0}, 'landscape')
mapGenerator:register2DPeaksFromFile('midgard', 'map.ff', 150,{x=0, y=0}, 'temp')
mapGenerator:register2DPeaksFromFile('midgard', 'map.ff', 200,{x=0, y=0}, 'humidity')
mapGenerator:register2DPeaksFromFile('midgard', 'map.ff', 100,{x=3, y=3}, 'landscape')
mapGenerator:register2DPeaksFromFile('midgard', 'map.ff', 150,{x=3, y=3}, 'temp')
mapGenerator:register2DPeaksFromFile('midgard', 'map.ff', 200,{x=3, y=3}, 'humidity')
--[[
-- [[
mapGenerator:registerCavern('midgard', 'cavern1', {
minY = -48,
maxY = 50,
maxY = 100,
smoothDistance = 20,
threshold = 0.2,
threshold = 0.1,
noiseParams ={
offset = 0,
offset = 0.2,
scale = 1,
spread = {x = 10, y = 250, z = 30},
seed = 5934,
@@ -188,6 +188,12 @@ mapGenerator:registerCavern('midgard', 'cavern1', {
persistence = 0.4,
lacunarity = 2.0
},
},
{
{x=100, y=0, z=100},
{x=100, y=0, z=200},
{x=200, y=0, z=200},
{x=200, y=0, z=100},
})--]]
-- --- Biomes ---