Compare commits
3 Commits
fcae65e8f8
...
757221e668
| Author | SHA1 | Date | |
|---|---|---|---|
| 757221e668 | |||
| 3793afebbd | |||
| af3ce8c769 |
@@ -9,6 +9,7 @@ local Plant = Node:getExtended({
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "meshoptions",
|
paramtype2 = "meshoptions",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
waving = 1,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
groups = {dig_immediate = 3},
|
groups = {dig_immediate = 3},
|
||||||
selection_box = {
|
selection_box = {
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ local MapGen = mapGenRequire('MapGen')
|
|||||||
|
|
||||||
-- Rocks
|
-- Rocks
|
||||||
sylite = 'rocks:sylite',
|
sylite = 'rocks:sylite',
|
||||||
syliteGray = 'rocks:sylite_gray',
|
syliteGray = 'rocks:sylite_gray',
|
||||||
syliteBlack = 'rocks:sylite_black',
|
syliteBlack = 'rocks:sylite_black',
|
||||||
--tauitite = 'rocks:tauitite',
|
tauititeLight = 'rocks:tauitite_light',
|
||||||
--iyellite = 'rocks:iyellite',
|
--iyellite = 'rocks:iyellite',
|
||||||
--falmyte = 'rocks:falmyte',
|
--falmyte = 'rocks:falmyte',
|
||||||
--hapcoryte = 'rocks:hapcoryte',
|
--hapcoryte = 'rocks:hapcoryte',
|
||||||
@@ -717,6 +717,7 @@ local ryeNoiseParams = {
|
|||||||
}
|
}
|
||||||
local ryeNoise
|
local ryeNoise
|
||||||
|
|
||||||
|
---@param mapGenerator MapGen
|
||||||
---@param nodeType MapGen.nodeType
|
---@param nodeType MapGen.nodeType
|
||||||
---@param area VoxelArea
|
---@param area VoxelArea
|
||||||
local function meadowPostProcessing(biome, mapGenerator, factors, data, data2, index, x, y, z, nodeType, area)
|
local function meadowPostProcessing(biome, mapGenerator, factors, data, data2, index, x, y, z, nodeType, area)
|
||||||
@@ -726,10 +727,22 @@ local function meadowPostProcessing(biome, mapGenerator, factors, data, data2, i
|
|||||||
|
|
||||||
if ryeNoise == nil then ryeNoise = core.get_value_noise(ryeNoiseParams) end
|
if ryeNoise == nil then ryeNoise = core.get_value_noise(ryeNoiseParams) end
|
||||||
|
|
||||||
if ryeNoise:get_2d({x=x, y=z}) + math.random(0, 3) > 8 then
|
local value = ryeNoise:get_2d({x=x, y=z}) + math.random(0, 5)
|
||||||
local i = area:index(x,y+1,z)
|
local i = area:index(x,y+1,z)
|
||||||
|
|
||||||
|
if value > 8 then
|
||||||
data[i] = id('plants:rye')
|
data[i] = id('plants:rye')
|
||||||
data2[i] = 3
|
data2[i] = 3
|
||||||
|
elseif value > 5 then
|
||||||
|
data[i] = id('plants:meadow_grass_1')
|
||||||
|
data2[i] = 3
|
||||||
|
elseif value > 3 then
|
||||||
|
data[i] = id('plants:meadow_grass_2')
|
||||||
|
data2[i] = 3
|
||||||
|
end
|
||||||
|
|
||||||
|
if ryeNoise:get_2d({x=x, y=z}) - math.random(0, 3) < -8 then
|
||||||
|
data[index] = mapGenerator.nodeIDs.tauititeLight
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -38,3 +38,21 @@ Plant:new({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Plant:new({
|
||||||
|
settings = {
|
||||||
|
name = 'meadow_grass_1',
|
||||||
|
tiles = {PlantsTileSheet:t(4,0)},
|
||||||
|
place_param2 = 3,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
Plant:new({
|
||||||
|
settings = {
|
||||||
|
name = 'meadow_grass_2',
|
||||||
|
tiles = {PlantsTileSheet:t(5,0)},
|
||||||
|
place_param2 = 3,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Reference in New Issue
Block a user