Add new types rocks, add test gradient mapgen
This commit is contained in:
@@ -16,6 +16,8 @@ local MapGen = mapGenRequire('MapGen')
|
||||
|
||||
-- Rocks
|
||||
sylite = 'rocks:sylite',
|
||||
syliteGray = 'rocks:sylite_gray',
|
||||
syliteBlack = 'rocks:sylite_black',
|
||||
tauitite = 'rocks:tauitite',
|
||||
iyellite = 'rocks:iyellite',
|
||||
falmyte = 'rocks:falmyte',
|
||||
@@ -219,8 +221,8 @@ local function generateRock(biome, mapGenerator, data, index, x, y, z)
|
||||
rocksNoise = core.get_value_noise(rocksNoiseParams)
|
||||
end
|
||||
|
||||
local noiseRocksValue = mathRound(rocksNoise:get_3d({x = x, y = y, z = z}))
|
||||
if noiseRocksValue == 1 then
|
||||
local noiseRocksValue = (rocksNoise:get_3d({x = x, y = y, z = z}))
|
||||
--[[if noiseRocksValue == 1 then
|
||||
data[index] = ids.malachite
|
||||
elseif noiseRocksValue == 2 then
|
||||
data[index] = ids.hapcoryte
|
||||
@@ -236,6 +238,13 @@ local function generateRock(biome, mapGenerator, data, index, x, y, z)
|
||||
data[index] = ids.burcite
|
||||
elseif noiseRocksValue == 8 then
|
||||
data[index] = ids.felhor
|
||||
end--]]
|
||||
if noiseRocksValue > 5 then
|
||||
data[index] = ids.syliteBlack
|
||||
elseif noiseRocksValue > 4.5 then
|
||||
data[index] = ids.syliteGray
|
||||
else
|
||||
data[index] = ids.sylite
|
||||
end
|
||||
end
|
||||
|
||||
@@ -246,9 +255,13 @@ local function generateSoil(biome, mapGenerator, data, index, x, y, z)
|
||||
rocksNoise = core.get_value_noise(rocksNoiseParams)
|
||||
end
|
||||
|
||||
local noiseRocksValue = mathRound(rocksNoise:get_3d({x = x, y = y, z = z}))
|
||||
local noiseRocksValue = (rocksNoise:get_3d({x = x, y = y, z = z}))
|
||||
|
||||
if noiseRocksValue > 4 then
|
||||
if noiseRocksValue > 5 then
|
||||
data[index] = ids.syliteBlack
|
||||
elseif noiseRocksValue > 4.5 then
|
||||
data[index] = ids.syliteGray
|
||||
elseif noiseRocksValue > 4 then
|
||||
data[index] = ids.sylite
|
||||
else
|
||||
data[index] = biome.groundNodesIDs.soil
|
||||
@@ -262,9 +275,13 @@ local function generateTurf(biome, mapGenerator, data, index, x, y, z)
|
||||
rocksNoise = core.get_value_noise(rocksNoiseParams)
|
||||
end
|
||||
|
||||
local noiseRocksValue = mathRound(rocksNoise:get_3d({x = x, y = y, z = z}))
|
||||
local noiseRocksValue = (rocksNoise:get_3d({x = x, y = y, z = z}))
|
||||
|
||||
if noiseRocksValue > 4 then
|
||||
if noiseRocksValue > 5 then
|
||||
data[index] = ids.syliteBlack
|
||||
elseif noiseRocksValue > 4.5 then
|
||||
data[index] = ids.syliteGray
|
||||
elseif noiseRocksValue > 4 then
|
||||
data[index] = ids.sylite
|
||||
else
|
||||
data[index] = biome.groundNodesIDs.turf
|
||||
|
||||
@@ -30,12 +30,17 @@ local function registerRocksTypes(postfix, x)
|
||||
{"sylite_gray"..postfix, {ts:t(x, 1)}},
|
||||
{"sylite_black"..postfix, {ts:t(x, 2)}},
|
||||
{"tauitite_light"..postfix, {ts:t(x, 3)}},
|
||||
{"tauitite"..postfix, {ts:t(x, 4)}},
|
||||
{"iyellite"..postfix, {ts:t(x, 5)}},
|
||||
{"falmyte"..postfix, {ts:t(x, 6)}},
|
||||
{"hapcoryte"..postfix, {ts:t(x, 8)}},
|
||||
{"burcite"..postfix, {ts:t(x, 10)}},
|
||||
{"felhor"..postfix, {ts:t(x, 12)}},
|
||||
{"tauitite_pink"..postfix, {ts:t(x, 4)}},
|
||||
{"tauitite"..postfix, {ts:t(x, 5)}},
|
||||
{"falmyte_light"..postfix, {ts:t(x, 6)}},
|
||||
{"falmyte_yellow"..postfix, {ts:t(x, 7)}},
|
||||
{"falmyte_red"..postfix, {ts:t(x, 8)}},
|
||||
{"falmyte_dark"..postfix, {ts:t(x, 9)}},
|
||||
{"iyellite"..postfix, {ts:t(x, 14)}},
|
||||
{"falmyte"..postfix, {ts:t(x, 14)}},
|
||||
{"hapcoryte"..postfix, {ts:t(x, 14)}},
|
||||
{"burcite"..postfix, {ts:t(x, 14)}},
|
||||
{"felhor"..postfix, {ts:t(x, 14)}},
|
||||
{"malachite"..postfix, {ts:t(x, 14)}}
|
||||
})
|
||||
end
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
Reference in New Issue
Block a user