feat: heightmap-inputs
This commit is contained in:
@@ -43,7 +43,7 @@ function place_structures_wide(x, z, w, d, seed, chunk_height)
|
||||
return placements
|
||||
end
|
||||
|
||||
function generate_heightmap(x, y, w, h, seed, s)
|
||||
function generate_heightmap(x, y, w, h, seed, s, inputs)
|
||||
local umap = Heightmap(w, h)
|
||||
local vmap = Heightmap(w, h)
|
||||
umap.noiseSeed = seed
|
||||
@@ -65,6 +65,12 @@ function generate_heightmap(x, y, w, h, seed, s)
|
||||
rivermap:pow(0.15)
|
||||
rivermap:max(0.5)
|
||||
map:mul(rivermap)
|
||||
|
||||
local desertmap = Heightmap(w, h)
|
||||
desertmap.noiseSeed = seed
|
||||
desertmap:cellnoise({x+52, y+326}, 0.3*s, 2, 0.2)
|
||||
desertmap:add(0.4)
|
||||
map:mixin(desertmap, inputs[1])
|
||||
return map
|
||||
end
|
||||
|
||||
@@ -72,6 +78,8 @@ function generate_biome_parameters(x, y, w, h, seed, s)
|
||||
local tempmap = Heightmap(w, h)
|
||||
tempmap.noiseSeed = seed + 5324
|
||||
tempmap:noise({x, y}, 0.04*s, 6)
|
||||
tempmap:mul(0.5)
|
||||
tempmap:add(0.5)
|
||||
local hummap = Heightmap(w, h)
|
||||
hummap.noiseSeed = seed + 953
|
||||
hummap:noise({x, y}, 0.04*s, 6)
|
||||
|
||||
Reference in New Issue
Block a user