[nalc_moretrees] Nettoyage code et ajout settingtypes.txt
This commit is contained in:
parent
35503c6217
commit
a92f131145
|
@ -1,8 +1,4 @@
|
|||
-- deciduous_cold
|
||||
-- Température : 55
|
||||
-- Humidité : 110
|
||||
-- 3-200
|
||||
|
||||
-- Biomes definition
|
||||
minetest.register_biome({
|
||||
name = "deciduous_cold",
|
||||
node_top = "default:dirt_with_grass",
|
||||
|
@ -35,10 +31,7 @@ minetest.register_biome({
|
|||
humidity_point = 111,
|
||||
})
|
||||
|
||||
-- Décorations --
|
||||
|
||||
-- fonctions de bruits
|
||||
-- variables de bruits
|
||||
-- fonctions et variables de bruits
|
||||
local densités = {
|
||||
{ offset = 0.000001,
|
||||
scale = 0.00001,
|
||||
|
@ -65,23 +58,19 @@ local function noise_param(seed, spread, densité, octaves, persist)
|
|||
}
|
||||
end
|
||||
|
||||
-- Génération des arbres de moretrees en fonction des biomes et non plus par biome_lib
|
||||
-- Décorations --
|
||||
|
||||
-- Génération des arbres de moretrees en fonction des biomes et non plus par biome_lib.
|
||||
-- Pour que cette génération soit active, il faut désactiver la génération de moretrees
|
||||
-- en mettant à false les arbres souhaités dans le fichier default_settings.txt du mod
|
||||
-- moretrees.
|
||||
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,
|
||||
|
@ -95,16 +84,7 @@ if not moretrees.enable_oak then
|
|||
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,
|
||||
|
@ -118,16 +98,7 @@ if not moretrees.enable_sequoia then
|
|||
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,
|
||||
|
@ -141,7 +112,6 @@ if not moretrees.enable_palm then
|
|||
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,
|
||||
|
@ -163,7 +133,6 @@ if not moretrees.enable_date_palm then
|
|||
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,
|
||||
|
@ -185,7 +154,6 @@ if not moretrees.enable_cedar then
|
|||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_coniferous_litter"},
|
||||
sidelen = 16,
|
||||
-- fill_ratio = 0.0005,
|
||||
noise_params = {
|
||||
offset = 0.00015,
|
||||
scale = 0.0015,
|
||||
|
@ -205,7 +173,6 @@ if not moretrees.enable_cedar then
|
|||
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,
|
||||
|
@ -225,7 +192,6 @@ if not moretrees.enable_cedar then
|
|||
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,
|
||||
|
@ -247,16 +213,7 @@ if not moretrees.enable_rubber_tree then
|
|||
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[2]),
|
||||
-- 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,
|
||||
|
@ -270,16 +227,7 @@ if not moretrees.enable_willow then
|
|||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
-- fill_ratio = 0.0005,
|
||||
noise_params = noise_param(755, 130, densités[2]),
|
||||
-- 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,
|
||||
|
@ -291,16 +239,7 @@ if not moretrees.enable_willow then
|
|||
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,
|
||||
|
@ -314,16 +253,7 @@ if not moretrees.enable_birch then
|
|||
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,
|
||||
|
@ -337,16 +267,7 @@ if not moretrees.enable_spruce then
|
|||
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,
|
||||
|
@ -358,16 +279,7 @@ if not moretrees.enable_spruce then
|
|||
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,
|
||||
|
@ -381,16 +293,7 @@ if not moretrees.enable_fir then
|
|||
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,
|
||||
|
@ -402,16 +305,7 @@ if not moretrees.enable_fir then
|
|||
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,
|
||||
|
@ -425,16 +319,7 @@ if not moretrees.enable_poplar then
|
|||
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,
|
||||
|
@ -446,16 +331,7 @@ if not moretrees.enable_poplar then
|
|||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
sidelen = 16,
|
||||
-- fill_ratio = 0.05,
|
||||
noise_params = noise_param(759, 100, 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,
|
||||
|
@ -467,16 +343,7 @@ if not moretrees.enable_poplar then
|
|||
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,
|
||||
|
@ -484,7 +351,33 @@ if not moretrees.enable_poplar then
|
|||
})
|
||||
end
|
||||
|
||||
-- Jungletree ne sera pas généré par moretrees
|
||||
-- /!\ La génération des Jungletrees n'est pas redéfinie ici mais est laissée à moretrees.
|
||||
-- Mettez à true (ou false) dans default_settings.txt de moretrees les jungletrees si vous
|
||||
-- voulez (ou non) que moretrees génère des Jungletrees supplémentaires.
|
||||
|
||||
-- Redefinir les feuilles avec l'apparence plantlike si configuré dans les paramètres
|
||||
-- (Améliore les performances des clients)
|
||||
if minetest.settings:get_bool(plantlike_leaves) or moretrees.plantlike_leaves then
|
||||
local function o_leaves(name, texture)
|
||||
minetest.override_item(name, {
|
||||
inventory_image = minetest.inventorycube(texture),
|
||||
drawtype = "plantlike",
|
||||
visual_scale = math.sqrt(2)
|
||||
})
|
||||
end
|
||||
|
||||
o_leaves("default:blueberry_bush_leaves", "default_blueberry_bush_leaves.png")
|
||||
o_leaves("default:blueberry_bush_leaves_with_berries", "default_blueberry_bush_leaves.png^default_blueberry_overlay.png")
|
||||
o_leaves("default:bush_leaves", "default_leaves.png")
|
||||
o_leaves("default:aspen_leaves", "default_aspen_leaves.png")
|
||||
o_leaves("default:pine_needles", "default_pine_needles.png")
|
||||
o_leaves("default:pine_bush_needles", "default_pine_needles.png")
|
||||
o_leaves("default:acacia_leaves", "default_acacia_leaves.png")
|
||||
o_leaves("default:acacia_bush_leaves", "default_acacia_leaves.png")
|
||||
o_leaves("nalc_mediterranean:needles", "default_pine_needles.png")
|
||||
o_leaves("nalc_mediterranean:olive_leaves", "feuilles_olivier.png")
|
||||
o_leaves("snow:needles", "default_pine_needles.png")
|
||||
end
|
||||
|
||||
minetest.register_alias("moretrees:acacia_sapling_ongen", "default:acacia_sapling")
|
||||
|
||||
|
|
1
nalc_moretrees/settingtypes.txt
Normal file
1
nalc_moretrees/settingtypes.txt
Normal file
|
@ -0,0 +1 @@
|
|||
plantlike_leaves = true
|
Loading…
Reference in New Issue
Block a user