493 lines
13 KiB
Lua
493 lines
13 KiB
Lua
-- deciduous_cold
|
|
-- Température : 55
|
|
-- Humidité : 110
|
|
-- 3-200
|
|
|
|
minetest.register_biome({
|
|
name = "deciduous_cold",
|
|
node_top = "default:dirt_with_grass",
|
|
depth_top = 1,
|
|
node_filler = "default:dirt",
|
|
node_riverbed = "default:sand",
|
|
depth_riverbed = 2,
|
|
node_dungeon = "default:cobble",
|
|
node_dungeon_alt = "default:mossycobble",
|
|
node_dungeon_stair = "default:stair_cobble",
|
|
y_min = 3,
|
|
y_max = 200,
|
|
heat_point = 55,
|
|
humidity_point = 69,
|
|
})
|
|
|
|
minetest.register_biome({
|
|
name = "deciduous_cold_humid",
|
|
node_top = "default:dirt_with_grass",
|
|
depth_top = 1,
|
|
node_filler = "default:dirt",
|
|
node_riverbed = "default:sand",
|
|
depth_riverbed = 2,
|
|
node_dungeon = "default:cobble",
|
|
node_dungeon_alt = "default:mossycobble",
|
|
node_dungeon_stair = "default:stair_cobble",
|
|
y_min = 3,
|
|
y_max = 200,
|
|
heat_point = 55,
|
|
humidity_point = 111,
|
|
})
|
|
|
|
-- Décorations --
|
|
|
|
-- fonctions de bruits
|
|
-- variables de bruits
|
|
local densités = {
|
|
{ offset = 0.000001,
|
|
scale = 0.00001,
|
|
},
|
|
{ offset = 0.00001,
|
|
scale = 0.0001,
|
|
},
|
|
{ offset = 0.0001,
|
|
scale = 0.001,
|
|
},
|
|
{ offset = 0.001,
|
|
scale = 0.01,
|
|
},
|
|
}
|
|
|
|
local function noise_param(seed, spread, densité, octaves, persist)
|
|
return {
|
|
offset = densité.offset or 0.001,
|
|
scale = densité.scale or 0.01,
|
|
spread = {x = spread or 100, y = spread or 100, z = spread or 100},
|
|
seed = seed or math.random(1,999),
|
|
octaves = octaves or 1,
|
|
persist = persist or 0.5,
|
|
}
|
|
end
|
|
|
|
-- Génération des arbres de moretrees en fonction des biomes et non plus par biome_lib
|
|
if not moretrees.enable_apple_tree then
|
|
minetest.register_decoration({
|
|
name = "moretrees:apple_tree",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
|
|
sidelen = 16,
|
|
--fill_ratio = 0.0005,
|
|
noise_params = noise_param(750, 200, densités[2]),
|
|
-- noise_params = {
|
|
-- offset = 0.00003,
|
|
-- scale = 0.001,
|
|
-- spread = {x = 50, y = 50, z = 50},
|
|
-- seed = 750,
|
|
-- octaves = 3,
|
|
-- persist = 0.5,
|
|
-- },
|
|
biomes = {"mixed_mushroom_deciduous", "deciduous_forest", "coniferous_forest", "mixed_mushroom_cold", "grassland", "deciduous_cold", "deciduous_cold_humid"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:apple_tree_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_oak then
|
|
minetest.register_decoration({
|
|
name = "moretrees:oak",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter", "nalc_mediterranean:dirt_with_mediterranean_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = noise_param(751, 200, densités[2]),
|
|
-- noise_params = {
|
|
-- offset = 0.00006,
|
|
-- scale = 0.00033,
|
|
-- spread = {x = 100, y = 100, z = 100},
|
|
-- seed = 751,
|
|
-- octaves = 1,
|
|
-- persist = 0,
|
|
-- },
|
|
biomes = {"grassland", "deciduous_forest", "mixed_mushroom_deciduous", "mixed_mushroom_cold", "coniferous_forest", "mediterranean"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:oak_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_sequoia then
|
|
minetest.register_decoration({
|
|
name = "moretrees:sequoia",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter", "default:dirt_with_snow"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = noise_param(752, 150, densités[4], 3),
|
|
-- noise_params = {
|
|
-- offset = 0.0003,
|
|
-- scale = 0.01,
|
|
-- spread = {x = 30, y = 30, z = 30},
|
|
-- seed = 752,
|
|
-- octaves = 3,
|
|
-- persist = 0.5,
|
|
-- },
|
|
biomes = {"grassland", "pine_forest", "coniferous_forest", "mixed_mushroom_cold", "deciduous_forest", "mixed_mushroom_deciduous", "taiga", "snow_biome_alpine"},
|
|
y_min = 100,
|
|
y_max = 210,
|
|
decoration = "moretrees:sequoia_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_palm then
|
|
minetest.register_decoration({
|
|
name = "moretrees:palm",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt", "default:sand", "default:desert_sand", "default:dirt_with_rainforest_litter"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = {
|
|
offset = 0.003,
|
|
scale = 0.01,
|
|
spread = {x = 30, y = 30, z = 30},
|
|
seed = 753,
|
|
octaves = 3,
|
|
persist = 0.5,
|
|
},
|
|
biomes = {"desert", "desert_ocean", "rainforest_swamp"},
|
|
y_min = -2,
|
|
y_max = 3,
|
|
decoration = "moretrees:palm_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_date_palm then
|
|
minetest.register_decoration({
|
|
name = "moretrees:date_palm",
|
|
deco_type = "simple",
|
|
place_on = {"default:sand", "default:desert_sand", "default:dry_dirt_with_dry_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = {
|
|
offset = -0.003,
|
|
scale = 0.01,
|
|
spread = {x = 30, y = 30, z = 30},
|
|
seed = 753,
|
|
octaves = 3,
|
|
persist = 0.5,
|
|
},
|
|
biomes = {"desert", "desert_ocean", "sandstone_desert", "sandstone_desert_ocean", "savanna_shore", "mediterranean_shore"},
|
|
y_min = 0,
|
|
y_max = 3,
|
|
decoration = "moretrees:date_palm_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_cedar then
|
|
minetest.register_decoration({
|
|
name = "moretrees:cedar_rare_alt50",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_coniferous_litter"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.0005,
|
|
noise_params = {
|
|
offset = 0.00015,
|
|
scale = 0.0015,
|
|
spread = {x = 130, y = 130, z = 130},
|
|
seed = 754,
|
|
octaves = 1,
|
|
persist = 0.6,
|
|
},
|
|
biomes = {"coniferous_forest", "mixed_mushroom_cold"},
|
|
y_min = 50,
|
|
y_max = 31000,
|
|
decoration = "moretrees:cedar_sapling_ongen",
|
|
})
|
|
|
|
minetest.register_decoration({
|
|
name = "moretrees:cedar_rare_alt100",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass", "nalc_mediterranean:dirt_with_mediterranean_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.0005,
|
|
noise_params = {
|
|
offset = 0.00015,
|
|
scale = 0.0008,
|
|
spread = {x = 130, y = 130, z = 130},
|
|
seed = 754,
|
|
octaves = 1,
|
|
persist = 0.6,
|
|
},
|
|
biomes = {"deciduous_forest", "mixed_mushroom_deciduous", "mediterranean"},
|
|
y_min = 100,
|
|
y_max = 31000,
|
|
decoration = "moretrees:cedar_sapling_ongen",
|
|
})
|
|
|
|
minetest.register_decoration({
|
|
name = "moretrees:cedar",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass", "default:dirt_with_snow"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = {
|
|
offset = 0.00015,
|
|
scale = 0.0015,
|
|
spread = {x = 130, y = 130, z = 130},
|
|
seed = 754,
|
|
octaves = 1,
|
|
persist = 0.6,
|
|
},
|
|
biomes = {"pine_forest"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:cedar_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_rubber_tree then
|
|
minetest.register_decoration({
|
|
name = "moretrees:rubber_tree",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_rainforest_litter", "default:dry_dirt_with_dry_grass", "default:dirt", "default:dry_dirt"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = noise_param(754, 130, densités[1]),
|
|
-- noise_params = {
|
|
-- offset = 0.00015,
|
|
-- scale = 0.0008,
|
|
-- spread = {x = 130, y = 130, z = 130},
|
|
-- seed = 754,
|
|
-- octaves = 1,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"rainforest", "rainforest_swamp", "mixed_mushroom_hot", "savanna", "savanna_shore"},
|
|
y_min = -1,
|
|
y_max = 31000,
|
|
decoration = "moretrees:rubber_tree_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_willow then
|
|
minetest.register_decoration({
|
|
name = "moretrees:willow_rare",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.0005,
|
|
noise_params = noise_param(755, 130, densités[1]),
|
|
-- noise_params = {
|
|
-- offset = 0.00015,
|
|
-- scale = 0.0008,
|
|
-- spread = {x = 130, y = 130, z = 130},
|
|
-- seed = 755,
|
|
-- octaves = 1,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"deciduous_forest", "mixed_mushroom_deciduous"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:willow_sapling_ongen",
|
|
})
|
|
|
|
minetest.register_decoration({
|
|
name = "moretrees:willow",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = noise_param(755, 100, densités[3]),
|
|
-- noise_params = {
|
|
-- offset = 0.0003,
|
|
-- scale = 0.0008,
|
|
-- spread = {x = 10, y = 10, z = 10},
|
|
-- seed = 755,
|
|
-- octaves = 1,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"deciduous_cold", "deciduous_cold_humid"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:willow_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_birch then
|
|
minetest.register_decoration({
|
|
name = "moretrees:birch",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = noise_param(756, 150, densités[3]),
|
|
-- noise_params = {
|
|
-- offset = 0.00001,
|
|
-- scale = 0.003,
|
|
-- spread = {x = 150, y = 150, z = 150},
|
|
-- seed = 756,
|
|
-- octaves = 3,
|
|
-- persist = 0.5,
|
|
-- },
|
|
biomes = {"coniferous_forest", "mixed_mushroom_cold", "grassland", "deciduous_forest", "mixed_mushroom_deciduous"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:birch_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_spruce then
|
|
minetest.register_decoration({
|
|
name = "moretrees:spruce_rare_alt40-200",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.0005,
|
|
noise_params = noise_param(757, 250, densités[2], 2),
|
|
-- noise_params = {
|
|
-- offset = 0.00015,
|
|
-- scale = 0.0015,
|
|
-- spread = {x = 130, y = 130, z = 130},
|
|
-- seed = 757,
|
|
-- octaves = 1,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"deciduous_forest", "mixed_mushroom_deciduous"},
|
|
y_min = 40,
|
|
y_max = 200,
|
|
decoration = "moretrees:spruce_sapling_ongen",
|
|
})
|
|
|
|
minetest.register_decoration({
|
|
name = "moretrees:spruce",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_snow", "default:dirt_with_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = noise_param(757, 250, densités[3], 2),
|
|
-- noise_params = {
|
|
-- offset = 0.0003,
|
|
-- scale = 0.0016,
|
|
-- spread = {x = 130, y = 130, z = 130},
|
|
-- seed = 757,
|
|
-- octaves = 1,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"coniferous_forest", "mixed_mushroom_cold", "taiga", "snow_biome_forest", "snow_biome_lush", "pine_forest"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:spruce_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_fir then
|
|
minetest.register_decoration({
|
|
name = "moretrees:fir_rare_alt40-200",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.0005,
|
|
noise_params = noise_param(758, 250, densités[2], 2),
|
|
-- noise_params = {
|
|
-- offset = 0.00015,
|
|
-- scale = 0.0015,
|
|
-- spread = {x = 130, y = 130, z = 130},
|
|
-- seed = 758,
|
|
-- octaves = 1,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"deciduous_forest", "mixed_mushroom_deciduous"},
|
|
y_min = 40,
|
|
y_max = 200,
|
|
decoration = "moretrees:fir_sapling_ongen",
|
|
})
|
|
|
|
minetest.register_decoration({
|
|
name = "moretrees:fir",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_snow", "default:dirt_with_grass", "default:dirt_with_coniferous_litter"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = noise_param(758, 250, densités[3], 2),
|
|
-- noise_params = {
|
|
-- offset = 0.0003,
|
|
-- scale = 0.0016,
|
|
-- spread = {x = 130, y = 130, z = 130},
|
|
-- seed = 758,
|
|
-- octaves = 1,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"snow_biome_forest", "taiga", "snow_biome_lush", "pine_forest", "coniferous_forest", "mixed_mushroom_cold"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:fir_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
if not moretrees.enable_poplar then
|
|
minetest.register_decoration({
|
|
name = "moretrees:poplar_small_rare",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.0005,
|
|
noise_params = noise_param(759, 250, densités[2], 3),
|
|
-- noise_params = {
|
|
-- offset = 0.00015,
|
|
-- scale = 0.0016,
|
|
-- spread = {x = 230, y = 230, z = 230},
|
|
-- seed = 759,
|
|
-- octaves = 3,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"deciduous_forest", "mixed_mushroom_deciduous", "deciduous_cold"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:poplar_small_sapling_ongen",
|
|
})
|
|
|
|
minetest.register_decoration({
|
|
name = "moretrees:poplar_small_dense",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.05,
|
|
noise_params = noise_param(759, 250, densités[4], 3),
|
|
-- noise_params = {
|
|
-- offset = 0.0006,
|
|
-- scale = 0.006,
|
|
-- spread = {x = 30, y = 30, z = 30},
|
|
-- seed = 759,
|
|
-- octaves = 3,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"deciduous_cold_humid"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:poplar_small_sapling_ongen",
|
|
})
|
|
|
|
minetest.register_decoration({
|
|
name = "moretrees:poplar",
|
|
deco_type = "simple",
|
|
place_on = {"default:dirt_with_grass"},
|
|
sidelen = 16,
|
|
-- fill_ratio = 0.005,
|
|
noise_params = noise_param(760, 50, densités[3], 2),
|
|
-- noise_params = {
|
|
-- offset = 0.0006,
|
|
-- scale = 0.006,
|
|
-- spread = {x = 30, y = 30, z = 30},
|
|
-- seed = 760,
|
|
-- octaves = 3,
|
|
-- persist = 0.6,
|
|
-- },
|
|
biomes = {"deciduous_cold", "deciduous_cold_humid"},
|
|
y_min = 0,
|
|
y_max = 31000,
|
|
decoration = "moretrees:poplar_sapling_ongen",
|
|
})
|
|
end
|
|
|
|
-- Jungletree ne sera pas généré par moretrees
|
|
|
|
minetest.register_alias("moretrees:acacia_sapling_ongen", "default:acacia_sapling")
|
|
|
|
minetest.log("action", "[nalc_moretrees] loaded.")
|
|
|