1
0
mirror of https://github.com/mt-mods/moretrees.git synced 2025-07-26 11:40:21 +02:00

21 Commits

Author SHA1 Message Date
9560970515 Merge remote-tracking branch 'upstream/master' 2024-09-15 09:35:20 +02:00
fdd341ac71 Merge remote-tracking branch 'upstream/master' 2023-11-23 00:13:27 +01:00
d1ae12c4b1 Merge remote-tracking branch 'upstream/master' 2023-06-07 22:10:42 +02:00
aaa0ba123b Merge remote-tracking branch 'upstream/master' 2022-08-26 15:21:26 +02:00
159cd8d506 Merge remote-tracking branch 'upstream/master' 2022-06-25 16:51:57 +02:00
bce9f8d1cb Merge remote-tracking branch 'upstream/master' 2021-04-08 13:31:03 +02:00
19d41419a0 Merge remote-tracking branch 'upstream/master' 2020-11-25 21:55:30 +01:00
be9bc9dc23 Merge remote-tracking branch 'upstream/master' 2020-11-16 21:09:28 +01:00
850e9627c7 Merge remote-tracking branch 'upstream/master' 2020-08-26 19:09:01 +02:00
b2a94399ec Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-06-20 15:49:44 +02:00
7383549476 Corrige spawn palmiers sur mud et corrige warning démarrage 2020-06-14 15:05:07 +02:00
ac9dd5503c Annule changement settings. Again. 2020-06-14 11:38:37 +02:00
5ee036f0f4 Annule les changements dans default_settings.txt
Revient au valeurs par défaut. Les paramètres seront lus depuis le
dossier du world.
2020-06-14 11:09:46 +02:00
fab2944277 Désactive génération de moretrees au profit de celle de nalc
Ajoute la terre méditérranéenne comme terrain de spawn
2020-06-13 14:34:28 +02:00
c8aaaf20ed Active les barrières et les feuilles d'arbres simplifiés 2020-05-08 19:26:52 +02:00
93553670d2 Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-05-08 16:21:00 +02:00
f3108af2e3 Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-02-29 18:40:04 +01:00
114e47966b Merge branch 'master' of yunohost.local:mtcontrib/moretrees into nalc-1.2-dev 2019-12-22 14:18:55 +01:00
157f53def0 Merge branch 'master' into nalc-1.2 2019-06-02 19:33:04 +02:00
26f1ec49d2 Les rubber tree spawn aussi dans le sable près de l'eau 2019-05-10 19:00:36 +02:00
aebc7a41b0 La récolte d'arbres de jungle de moretrees donne ceux du mod default
* Cela fait gagner un peu de la place dans l'inventaire.
2019-04-26 19:07:47 +02:00
5 changed files with 82 additions and 89 deletions

View File

@ -1,79 +1,80 @@
moretrees.beech_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
}
moretrees.palm_biome = {
place_on = xcompat.materials.sand,
surface = xcompat.materials.sand,
min_elevation = -1,
max_elevation = 1,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 10,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 10,
}
moretrees.date_palm_biome = {
place_on = xcompat.materials.desert_sand,
surface = xcompat.materials.desert_sand,
min_elevation = -1,
max_elevation = 10,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 100,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 100,
}
moretrees.date_palm_biome_2 = {
place_on = xcompat.materials.desert_sand,
surface = xcompat.materials.desert_sand,
min_elevation = 11,
max_elevation = 30,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 1,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 1,
}
moretrees.apple_tree_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 1,
max_elevation = 10,
place_on = {xcompat.materials.dirt_with_grass},
biomes = {"deciduous_forest"},
fill_ratio = 0.0001,
}
moretrees.oak_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 0,
max_elevation = 10,
fill_ratio = 0.0003
}
moretrees.sequoia_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 0,
max_elevation = 10,
fill_ratio = 0.0001,
}
moretrees.birch_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 10,
max_elevation = 15,
fill_ratio = 0.001,
}
moretrees.willow_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = -5,
max_elevation = 5,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 5,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 5,
}
moretrees.rubber_tree_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = -5,
max_elevation = 5,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 10,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 10,
}
moretrees.jungletree_biome = {
place_on = {
surface = {
xcompat.materials.dirt,
xcompat.materials.dirt_with_grass,
"woodsoils:dirt_with_leaves_1",
@ -82,74 +83,74 @@ moretrees.jungletree_biome = {
"default:dirt_with_rainforest_litter",
},
min_elevation = 1,
spawn_by = minetest.get_modpath("default") and {"default:jungletree"} or nil,
num_spawn_by = minetest.get_modpath("default") and 1 or nil,
near_nodes = minetest.get_modpath("default") and {"default:jungletree"} or nil,
near_nodes_count = minetest.get_modpath("default") and 1 or nil,
biomes = {"rainforest", "rainforest_swamp"},
}
moretrees.spruce_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 20,
}
moretrees.cedar_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 0, --Added to solve an issue where cedar trees would sometimes spawn deep underground
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 5,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 5,
}
-- Poplar requires a lot of water.
moretrees.poplar_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 0,
max_elevation = 50,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 1,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 1,
}
-- Spawn an occasional poplar elsewhere.
moretrees.poplar_biome_2 = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 0,
max_elevation = 50,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 10,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 10,
}
-- Subterranean lakes provide enough water for poplars to grow
moretrees.poplar_biome_3 = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 0,
max_elevation = 50,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 1,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 1,
}
moretrees.poplar_small_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 0,
max_elevation = 50,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 1,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 1,
}
moretrees.poplar_small_biome_2 = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 0,
max_elevation = 50,
spawn_by = {xcompat.materials.water_source},
num_spawn_by = 5,
near_nodes = {xcompat.materials.water_source},
near_nodes_count = 5,
}
moretrees.fir_biome = {
place_on = xcompat.materials.dirt_with_grass,
surface = xcompat.materials.dirt_with_grass,
min_elevation = 25,
}
moretrees.fir_biome_snow = {
place_on = {"snow:dirt_with_snow", "snow:snow"},
surface = {"snow:dirt_with_snow", "snow:snow"},
below_nodes = {xcompat.materials.dirt, xcompat.materials.dirt_with_grass, "snow:dirt_with_snow"},
}

View File

@ -134,24 +134,18 @@ function translate_biome_defs(def, treename, index)
if not index then index = 1 end
local deco_def = {
name = treename .. "_" .. index,
place_on = def.place_on,
deco_type = "simple",
place_on = def.place_on or def.surface,
sidelen = 16,
fill_ratio = def.fill_ratio or 0.001,
--biomes eventually?
y_min = def.min_elevation,
y_max = def.max_elevation,
spawn_by = def.spawn_by,
num_spawn_by = def.num_spawn_by,
spawn_by = def.near_nodes,
num_spawn_by = def.near_nodes_count,
decoration = "moretrees:"..treename.."_sapling_ongen"
}
if minetest.features.lsystem_decoration_type then
deco_def.deco_type = "lsystem"
deco_def.treedef = moretrees[treename .. "_model"]
else
deco_def.deco_type = "simple"
deco_def.decoration = "moretrees:"..treename.."_sapling_ongen"
end
deco_ids[#deco_ids+1] = treename .. ("_" .. index or "_1")
return deco_def
@ -182,35 +176,33 @@ minetest.register_decoration(translate_biome_defs(moretrees.poplar_biome_3, "pop
minetest.register_decoration(translate_biome_defs(moretrees.poplar_small_biome, "poplar_small", 4))
minetest.register_decoration(translate_biome_defs(moretrees.poplar_small_biome_2, "poplar_small", 5))
if not minetest.features.lsystem_decoration_type then
--[[
this is purposefully wrapped in a on mods loaded callback to that it gets the proper ids
if other mods clear the registered decorations
]]
minetest.register_on_mods_loaded(function()
for k, v in pairs(deco_ids) do
deco_ids[k] = minetest.get_decoration_id(v)
end
minetest.set_gen_notify("decoration", deco_ids)
end)
--[[
this is purposefully wrapped in a on mods loaded callback to that it gets the proper ids
if other mods clear the registered decorations
]]
minetest.register_on_mods_loaded(function()
for k, v in pairs(deco_ids) do
deco_ids[k] = minetest.get_decoration_id(v)
end
minetest.set_gen_notify("decoration", deco_ids)
end)
minetest.register_on_generated(function(minp, maxp, blockseed)
local g = minetest.get_mapgen_object("gennotify")
local locations = {}
for _, id in pairs(deco_ids) do
local deco_locations = g["decoration#" .. id] or {}
for _, pos in pairs(deco_locations) do
locations[#locations+1] = pos
end
minetest.register_on_generated(function(minp, maxp, blockseed)
local g = minetest.get_mapgen_object("gennotify")
local locations = {}
for _, id in pairs(deco_ids) do
local deco_locations = g["decoration#" .. id] or {}
for _, pos in pairs(deco_locations) do
locations[#locations+1] = pos
end
end
if #locations == 0 then return end
for _, pos in ipairs(locations) do
local timer = minetest.get_node_timer({x=pos.x, y=pos.y+1, z=pos.z})
timer:start(math.random(2,10))
end
end)
end
if #locations == 0 then return end
for _, pos in ipairs(locations) do
local timer = minetest.get_node_timer({x=pos.x, y=pos.y+1, z=pos.z})
timer:start(math.random(2,10))
end
end)
-- Code to spawn a birch tree

View File

@ -218,6 +218,7 @@ local dirs2 = { 12, 9, 18, 7, 12 }
local moretrees_new_leaves_drawtype = "allfaces_optional"
local moretrees_plantlike_leaves_visual_scale = 1
local moretrees_new_leaves_waving = 1
if moretrees.plantlike_leaves then
moretrees_new_leaves_drawtype = "plantlike"
@ -298,12 +299,9 @@ for i in ipairs(moretrees.treelist) do
end
local moretrees_leaves_inventory_image = nil
local moretrees_new_leaves_waving = nil
if moretrees.plantlike_leaves then
moretrees_leaves_inventory_image = minetest.inventorycube("moretrees_"..treename.."_leaves.png")
else
moretrees_new_leaves_waving = 1
end
minetest.register_node("moretrees:"..treename.."_leaves", {
@ -617,8 +615,6 @@ for color = 1, #jungleleaves do
if moretrees.plantlike_leaves then
moretrees_leaves_inventory_image = minetest.inventorycube("moretrees_jungletree_leaves_"..jungleleaves[color]..".png")
else
moretrees_new_leaves_waving = 1
end
minetest.register_node(leave_name, {

View File

@ -13,7 +13,8 @@ local dirt_surfaces = {
["woodsoils:dirt_with_leaves_1"] = true,
["woodsoils:dirt_with_leaves_2"] = true,
["woodsoils:grass_with_leaves_1"] = true,
["woodsoils:grass_with_leaves_2"] = true
["woodsoils:grass_with_leaves_2"] = true,
["meditteranean_biome:dirt_with_mediterranean_grass"] = true
}
local conifer_surfaces = {
@ -27,7 +28,8 @@ local conifer_surfaces = {
["woodsoils:dirt_with_leaves_2"] = true,
["woodsoils:grass_with_leaves_1"] = true,
["woodsoils:grass_with_leaves_2"] = true,
["default:dirt_with_snow"] = true
["default:dirt_with_snow"] = true,
["meditteranean_biome:dirt_with_mediterranean_grass"] = true
}
local sand_surfaces = {
@ -35,6 +37,7 @@ local sand_surfaces = {
[xcompat.materials.sand] = true,
[xcompat.materials.desert_sand] = true,
["cottages:loam"] = true,
["darkage:mud"] = true,
-- note, no silver sand here.
-- too cold for a palm, too... well... sandy for anything else.
}

View File

@ -261,6 +261,7 @@ moretrees.jungletree_model={
trunk_type=nil,
thin_branches=true,
fruit_chance=15,
fruit="vines:vine"
}
moretrees.fir_model={
@ -268,7 +269,7 @@ moretrees.fir_model={
rules_a=nil,
rules_b=nil,
trunk="moretrees:fir_trunk",
leaves="moretrees:fir_leaves",
leaves=nil,
angle=45,
iterations=7,
random_level=5,