Update savanna biome with new dirt n decor
This commit is contained in:
parent
cb407ac7c1
commit
a7d6b7c469
@ -15,6 +15,8 @@ Ethereal Mapgen mod for Minetest (works on all except v6)
|
||||
- Added Etherium ore and dust
|
||||
- Added sparse decoration of dry grass and shrub to caves biome
|
||||
- Added sponges that spawn near coral, dry sponge in furnace to soak up water
|
||||
- Added new savanna dirt and decorations
|
||||
- Use default grass abms
|
||||
|
||||
### 1.26
|
||||
|
||||
|
104
dirt.lua
104
dirt.lua
@ -37,11 +37,14 @@ for n = 1, #dirts do
|
||||
tiles = {
|
||||
"ethereal_grass_"..name.."_top.png",
|
||||
"default_dirt.png",
|
||||
{name = "default_dirt.png^ethereal_grass_"..name.."_side.png",
|
||||
tileable_vertical = false}
|
||||
{
|
||||
name = "default_dirt.png^ethereal_grass_"
|
||||
.. name .."_side.png",
|
||||
tileable_vertical = false
|
||||
}
|
||||
},
|
||||
is_ground_content = ethereal.cavedirt,
|
||||
groups = {crumbly = 3, soil = 1, ethereal_grass = 1},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
soil = {
|
||||
base = "ethereal:"..name.."_dirt",
|
||||
dry = "farming:soil",
|
||||
@ -55,74 +58,6 @@ for n = 1, #dirts do
|
||||
|
||||
end
|
||||
|
||||
-- re-register dirt types for abm
|
||||
dirts = {
|
||||
"ethereal:bamboo_dirt", "ethereal:jungle_dirt", "ethereal:grove_dirt",
|
||||
"ethereal:prairie_dirt", "ethereal:cold_dirt", "ethereal:crystal_dirt",
|
||||
"ethereal:mushroom_dirt", "ethereal:fiery_dirt", "ethereal:gray_dirt",
|
||||
"default:dirt_with_grass", "default:dirt_with_dry_grass",
|
||||
"default:dirt_with_snow", "default:dirt_with_rainforest_litter",
|
||||
"default:dirt_with_coniferous_litter"
|
||||
}
|
||||
|
||||
-- check surrounding grass and change dirt to same colour
|
||||
local grass_spread = function(pos, node)
|
||||
|
||||
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
|
||||
-- not enough light
|
||||
if (minetest.get_node_light(above) or 0) < 13 then
|
||||
return
|
||||
end
|
||||
|
||||
local name = minetest.get_node(above).name
|
||||
local def = minetest.registered_nodes[name]
|
||||
|
||||
-- water above grass
|
||||
if name == "ignore" or not def or def.liquidtype ~= "none" then
|
||||
return
|
||||
end
|
||||
|
||||
local curr_max, curr_type, num = 0, ""
|
||||
|
||||
-- find all default and ethereal grasses in area around dirt
|
||||
local positions, grasses = minetest.find_nodes_in_area(
|
||||
{x = pos.x - 1, y = pos.y - 2, z = pos.z - 1},
|
||||
{x = pos.x + 1, y = pos.y + 2, z = pos.z + 1}, dirts)
|
||||
|
||||
-- count new grass nodes
|
||||
for n = 1, #dirts do
|
||||
|
||||
num = grasses[ dirts[n] ] or 0
|
||||
|
||||
if num > curr_max then
|
||||
curr_max = num
|
||||
curr_type = dirts[n]
|
||||
end
|
||||
end
|
||||
|
||||
-- no grass nearby, keep as dirt
|
||||
if curr_type == "" then
|
||||
return
|
||||
end
|
||||
|
||||
minetest.swap_node(pos, {name = curr_type})
|
||||
end
|
||||
|
||||
-- any grass with a block above will turn into dirt
|
||||
local grass_devoid = function(pos, node)
|
||||
|
||||
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local name = minetest.get_node(above).name
|
||||
local nodedef = minetest.registered_nodes[name]
|
||||
|
||||
if name ~= "ignore" and nodedef and not ((nodedef.sunlight_propagates or
|
||||
nodedef.paramtype == "light") and
|
||||
nodedef.liquidtype == "none") then
|
||||
|
||||
minetest.swap_node(pos, {name = "default:dirt"})
|
||||
end
|
||||
end
|
||||
|
||||
-- flower spread, also crystal and fire flower regeneration
|
||||
local flower_spread = function(pos, node)
|
||||
@ -268,32 +203,7 @@ for _, ab in pairs(minetest.registered_abms) do
|
||||
local node2 = ab.nodenames and ab.nodenames[2] or ""
|
||||
local neigh = ab.neighbors and ab.neighbors[1] or ""
|
||||
|
||||
-- find 'dirt to grass abm' and replace with spread function
|
||||
if label == "Grass spread"
|
||||
or (node1 == "default:dirt"
|
||||
and neigh == "default:dirt_with_grass") then
|
||||
|
||||
--ab.interval = 2
|
||||
--ab.chance = 1
|
||||
ab.nodenames = {"default:dirt"}
|
||||
ab.neighbors = {"air"}
|
||||
ab.action = grass_spread
|
||||
|
||||
-- find 'grass devoid of light to dirt' abm and change to devoid function
|
||||
elseif label == "Grass covered"
|
||||
or (node1 == "default:dirt_with_grass"
|
||||
and node2 == "default:dirt_with_dry_grass") then
|
||||
|
||||
--ab.interval = 2
|
||||
--ab.chance = 1
|
||||
ab.nodenames = {
|
||||
"default:dirt_with_grass", "default:dirt_with_dry_grass",
|
||||
"default:dirt_with_snow", "group:ethereal_grass"
|
||||
}
|
||||
ab.action = grass_devoid
|
||||
|
||||
-- find flower spread abm and change to spread function
|
||||
elseif label == "Flower spread"
|
||||
if label == "Flower spread"
|
||||
or node1 == "group:flora" then
|
||||
|
||||
--ab.interval = 1
|
||||
|
2
init.lua
2
init.lua
@ -39,7 +39,7 @@ ethereal = {
|
||||
sandstone = 1, -- Sandstone with smaller cactus
|
||||
quicksand = 1, -- Quicksand banks
|
||||
plains = 1, -- Dry dirt with scorched trees
|
||||
savannah = 1, -- Dry yellow grass with acacia tree's
|
||||
savanna = 1, -- Dry yellow grass with acacia tree's
|
||||
fiery = 1, -- Red grass with lava craters
|
||||
sandclay = 1, -- Sand areas with clay underneath
|
||||
swamp = 1, -- Swamp areas with vines on tree's, mushrooms, lilly's and clay sand
|
||||
|
@ -442,7 +442,9 @@ if minetest.registered_nodes["default:dirt_with_rainforest_litter"] then
|
||||
|
||||
default.register_leafdecay({
|
||||
trunks = {"default:tree"},
|
||||
leaves = {"default:apple", "default:leaves", "ethereal:orange", "ethereal:orange_leaves"},
|
||||
leaves = {
|
||||
"default:apple", "default:leaves", "ethereal:orange",
|
||||
"ethereal:orange_leaves", "ethereal:vine"},
|
||||
radius = 3
|
||||
})
|
||||
|
||||
|
95
mapgen.lua
95
mapgen.lua
@ -188,8 +188,8 @@ add_biome("jumble_ocean", nil, "default:sand", 1, "default:sand", 2,
|
||||
nil, nil, nil, nil, nil, -192, 1, 25, 50, ethereal.jumble)
|
||||
|
||||
if minetest.registered_nodes["default:dirt_with_rainforest_litter"] then
|
||||
add_biome("junglee", nil, "default:dirt_with_rainforest_litter", 1, "default:dirt", 3,
|
||||
nil, nil, nil, nil, nil, 1, 71, 30, 60, ethereal.junglee)
|
||||
add_biome("junglee", nil, "default:dirt_with_rainforest_litter", 1,
|
||||
"default:dirt", 3, nil, nil, nil, nil, nil, 1, 71, 30, 60, ethereal.junglee)
|
||||
else
|
||||
add_biome("junglee", nil, "ethereal:jungle_dirt", 1, "default:dirt", 3,
|
||||
nil, nil, nil, nil, nil, 1, 71, 30, 60, ethereal.junglee)
|
||||
@ -225,10 +225,15 @@ add_biome("plains", nil, "ethereal:dry_dirt", 1, "default:dirt", 3,
|
||||
add_biome("plains_ocean", nil, "default:sand", 1, "default:sand", 2,
|
||||
nil, nil, nil, nil, nil, -192, 2, 55, 25, ethereal.plains)
|
||||
|
||||
add_biome("savannah", nil, "default:dirt_with_dry_grass", 1, "default:dirt", 3,
|
||||
nil, nil, nil, nil, nil, 3, 50, 55, 25, ethereal.savannah)
|
||||
if minetest.registered_nodes["default:dry_dirt_with_dry_grass"] then
|
||||
add_biome("savanna", nil, "default:dry_dirt_with_dry_grass", 1,
|
||||
"default:dry_dirt", 3, nil, nil, nil, nil, nil, 3, 50, 55, 25, ethereal.savannah)
|
||||
else
|
||||
add_biome("savanna", nil, "default:dirt_with_dry_grass", 1, "default:dirt",
|
||||
3, nil, nil, nil, nil, nil, 3, 50, 55, 25, ethereal.savannah)
|
||||
end
|
||||
|
||||
add_biome("savannah_ocean", nil, "default:sand", 1, "default:sand", 2,
|
||||
add_biome("savanna_ocean", nil, "default:sand", 1, "default:sand", 2,
|
||||
nil, nil, nil, nil, nil, -192, 1, 55, 25, ethereal.savannah)
|
||||
|
||||
add_biome("fiery", nil, "ethereal:fiery_dirt", 1, "default:dirt", 3,
|
||||
@ -379,7 +384,13 @@ add_schem({"default:dirt_with_grass"}, 0.02, {"grassytwo"}, 50, 100, ethereal.bi
|
||||
add_schem({"ethereal:prairie_dirt"}, 0.01, {"prairie"}, 1, 100, ethereal.orangetree, ethereal.prairie)
|
||||
|
||||
-- default acacia tree
|
||||
add_schem({"default:dirt_with_dry_grass"}, 0.004, {"savannah"}, 1, 100, dpath .. "acacia_tree.mts", ethereal.savannah)
|
||||
if minetest.registered_nodes["default:dry_dirt_with_dry_grass"] then
|
||||
add_schem({"default:dry_dirt_with_dry_grass"}, 0.004, {"savanna"}, 1, 100,
|
||||
dpath .. "acacia_tree.mts", ethereal.savannah)
|
||||
else
|
||||
add_schem({"default:dirt_with_dry_grass"}, 0.004, {"savanna"}, 1, 100,
|
||||
dpath .. "acacia_tree.mts", ethereal.savannah)
|
||||
end
|
||||
|
||||
-- large cactus (by Paramat)
|
||||
if ethereal.desert == 1 then
|
||||
@ -398,7 +409,7 @@ minetest.register_decoration({
|
||||
biomes = {"desert"},
|
||||
y_min = 5,
|
||||
y_max = 31000,
|
||||
schematic = dpath.."large_cactus.mts",
|
||||
schematic = dpath .. "large_cactus.mts",
|
||||
flags = "place_center_x", --, place_center_z",
|
||||
rotation = "random",
|
||||
})
|
||||
@ -454,6 +465,28 @@ minetest.register_decoration({
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.registered_nodes["default:dry_dirt_with_dry_grass"] then
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dry_dirt_with_dry_grass"},
|
||||
sidelen = 4,
|
||||
noise_params = {
|
||||
offset = -1.5,
|
||||
scale = -1.5,
|
||||
spread = {x = 200, y = 200, z = 200},
|
||||
seed = 329,
|
||||
octaves = 4,
|
||||
persist = 1.0
|
||||
},
|
||||
biomes = {"savanna"},
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
decoration = "default:dry_dirt",
|
||||
place_offset_y = -1,
|
||||
flags = "force_placement",
|
||||
})
|
||||
end
|
||||
|
||||
-- bush
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
@ -470,14 +503,14 @@ minetest.register_decoration({
|
||||
biomes = {"grassy", "grassytwo", "jumble"},
|
||||
y_min = 1,
|
||||
y_max = 31000,
|
||||
schematic = dpath .. "/bush.mts",
|
||||
schematic = dpath .. "bush.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
-- Acacia bush
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_dry_grass"},
|
||||
place_on = {"default:dirt_with_dry_grass", "default:dry_dirt_with_dry_grass"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
@ -487,13 +520,36 @@ minetest.register_decoration({
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"savannah", "mesa"},
|
||||
biomes = {"savanna", "mesa"},
|
||||
y_min = 1,
|
||||
y_max = 31000,
|
||||
schematic = dpath .. "/acacia_bush.mts",
|
||||
schematic = dpath .. "acacia_bush.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
|
||||
-- Pine bush
|
||||
if minetest.registered_nodes["default:pine_bush"] then
|
||||
minetest.register_decoration({
|
||||
name = "default:pine_bush",
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_snow"},
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.004,
|
||||
scale = 0.01,
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 137,
|
||||
octaves = 3,
|
||||
persist = 0.7,
|
||||
},
|
||||
biomes = {"alpine"},
|
||||
y_max = 31000,
|
||||
y_min = 4,
|
||||
schematic = dpath .. "pine_bush.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
end
|
||||
|
||||
--= simple decorations
|
||||
|
||||
local add_node = function(a, b, c, d, e, f, g, h, i, j)
|
||||
@ -529,8 +585,16 @@ add_node({"default:sandstone"}, 0.015, {"sandstone"}, 1, 100, {"default:dry_shru
|
||||
add_node({"bakedclay:red", "bakedclay:orange"}, 0.015, {"mesa"}, 1, 100, {"default:dry_shrub"}, nil, nil, nil, ethereal.mesa)
|
||||
|
||||
-- dry grass
|
||||
add_node({"default:dirt_with_dry_grass"}, 0.25, {"savannah"}, 1, 100, {"default:dry_grass_2",
|
||||
"default:dry_grass_3", "default:dry_grass_4", "default:dry_grass_5"}, nil, nil, nil, ethereal.savannah)
|
||||
if minetest.registered_nodes["default:dry_dirt_with_dry_grass"] then
|
||||
add_node({"default:dry_dirt_with_dry_grass"}, 0.25, {"savanna"}, 1, 100,
|
||||
{"default:dry_grass_2", "default:dry_grass_3", "default:dry_grass_4",
|
||||
"default:dry_grass_5"}, nil, nil, nil, ethereal.savannah)
|
||||
else
|
||||
add_node({"default:dirt_with_dry_grass"}, 0.25, {"savanna"}, 1, 100,
|
||||
{"default:dry_grass_2", "default:dry_grass_3", "default:dry_grass_4",
|
||||
"default:dry_grass_5"}, nil, nil, nil, ethereal.savannah)
|
||||
end
|
||||
|
||||
add_node({"default:dirt_with_dry_grass"}, 0.10, {"mesa"}, 1, 100, {"default:dry_grass_2",
|
||||
"default:dry_grass_3", "default:dry_grass_4", "default:dry_grass_5"}, nil, nil, nil, ethereal.mesa)
|
||||
add_node({"default:desert_stone"}, 0.005, {"caves"}, 5, 40, {"default:dry_grass_2",
|
||||
@ -652,8 +716,7 @@ minetest.register_decoration({
|
||||
y_max = 31000,
|
||||
y_min = 1,
|
||||
place_offset_y = 1,
|
||||
schematic = minetest.get_modpath("default")
|
||||
.. "/schematics/blueberry_bush.mts",
|
||||
schematic = dpath .. "blueberry_bush.mts",
|
||||
flags = "place_center_x, place_center_z",
|
||||
})
|
||||
else
|
||||
@ -1002,7 +1065,7 @@ register_fern_decoration(5, 1)
|
||||
end
|
||||
|
||||
if ethereal.tundra and minetest.registered_nodes["default:permafrost"] then
|
||||
minetest.register_biome({
|
||||
minetest.register_biome({
|
||||
name = "tundra_highland",
|
||||
node_dust = "default:snow",
|
||||
node_riverbed = "default:gravel",
|
||||
|
@ -33,7 +33,7 @@ ethereal.mushroom = 1 -- Purple grass with giant mushrooms
|
||||
ethereal.sandstone = 1 -- Sandstone with smaller cactus
|
||||
ethereal.quicksand = 1 -- Quicksand banks
|
||||
ethereal.plains = 1 -- Dry dirt with scorched trees
|
||||
ethereal.savannah = 1 -- Dry yellow grass with acacia tree's
|
||||
ethereal.savanna = 1 -- Dry yellow grass with acacia tree's
|
||||
ethereal.fiery = 1 -- Red grass with lava craters
|
||||
ethereal.sandclay = 1 -- Sand areas with clay underneath
|
||||
ethereal.swamp = 1 -- Swamp areas with vines on tree's, mushrooms, lilly's and clay sand
|
||||
|
Loading…
Reference in New Issue
Block a user