MapGen: add bime weight and minor fixes. Close #7
This commit is contained in:
@@ -48,8 +48,8 @@ mapGenerator:registerLayer('midgard', {
|
||||
maxHumidity = 100,
|
||||
calcTemp = calcTemp,
|
||||
calcHumidity = calcHumidity,
|
||||
biomesVerticalScattering = 5,
|
||||
biomesGorizontalScattering = 5,
|
||||
biomesVerticalScattering = 2,
|
||||
biomesGorizontalScattering = 0,
|
||||
triangulationLandscapeFile = 'tarion.json',
|
||||
triangulationTempFile = 'tarion.json',
|
||||
triangulationHumidityFile = 'tarion.json',
|
||||
@@ -730,9 +730,9 @@ end
|
||||
|
||||
mapGenerator:registerBiome('midgard', 'green_meadow', {
|
||||
tempPoint = 80,
|
||||
humidityPoint = 60,
|
||||
minY = 100,
|
||||
maxY = -50,
|
||||
humidityPoint = 80,
|
||||
minY = -50,
|
||||
maxY = 100,
|
||||
groundNodes = {
|
||||
soil = 'soils:humus',
|
||||
turf = 'soils:turf_meadow',
|
||||
@@ -763,6 +763,30 @@ mapGenerator:registerBiome('midgard', 'green_meadow', {
|
||||
--postProcessing = postProcessing
|
||||
})
|
||||
|
||||
mapGenerator:registerBiome('midgard', 'test_factors_biome', {
|
||||
tempPoint = 10,
|
||||
humidityPoint = 10,
|
||||
minY = -50,
|
||||
maxY = 100,
|
||||
groundNodes = {
|
||||
soil = 'soils:humus',
|
||||
turf = 'soils:turf_meadow',
|
||||
rock = 'rocks:sylite',
|
||||
bottom = 'soils:humus',
|
||||
},
|
||||
soilHeight = 5,
|
||||
generateTurf = function (self, mapGenerator, factors, data, data2, index, x, y, z)
|
||||
local weight = factors.weight
|
||||
if weight <= 0.3 then
|
||||
data[index] = id('rocks:sylite')
|
||||
elseif weight <= 0.6 then
|
||||
data[index] = id('rocks:sylite_gray')
|
||||
else
|
||||
data[index] = id('rocks:sylite_black')
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
mapGenerator:registerTree('test_tree', {
|
||||
path = core.get_modpath(core.get_current_modname())..'/schems/test_tree.mts',
|
||||
})
|
||||
@@ -816,22 +840,4 @@ mapGenerator:registerCavern('midgard', 'test_cavern', {
|
||||
step = 100
|
||||
})--]]
|
||||
|
||||
mapGenerator:registerOre('midgard', 'test_ore', {
|
||||
type = 'cheesed',
|
||||
nodeName = 'air',
|
||||
wherein = {'rocks:sylite'},
|
||||
threshold = 0.5,
|
||||
noiseParams = {
|
||||
baseNoise = {
|
||||
offset = 0,
|
||||
scale = 4,
|
||||
spread = {x = 10, y = 30, z = 30},
|
||||
seed = 12,
|
||||
octaves = 2,
|
||||
persistence = 0.6,
|
||||
lacunarity = 2
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
return mapGenerator
|
||||
|
||||
Reference in New Issue
Block a user