Merge pull request #26 from Rogier-5/poplar

Add poplar tree
This commit is contained in:
Vanessa Ezekowitz 2016-07-03 04:52:27 -04:00 committed by GitHub
commit 5735554d6a
14 changed files with 179 additions and 2 deletions

View File

@ -7,13 +7,14 @@ All source code:
Date & cocos palm code (date_palm.lua, cocos_palm.lua) Date & cocos palm code (date_palm.lua, cocos_palm.lua)
© 2016, Rogier <rogier777@gmail.com> © 2016, Rogier <rogier777@gmail.com>
Published under the terms and conditions of the WTFPL. Published under the terms and conditions of the WTFPL.
All date & date palm textures, date-based food, cocos flower & green coconuts: All date & date palm textures, date-based food, cocos flower & green coconuts,
and all poplar textures:
© 2016, Rogier <rogier777@gmail.com> © 2016, Rogier <rogier777@gmail.com>
Published under the terms and conditions of CC-BY-SA-3.0 Unported. Published under the terms and conditions of CC-BY-SA-3.0 Unported.
- Three of the date palm textures are modifications of existing moretrees textures - Three of the date palm textures are modifications of existing moretrees textures
- The green coconuts are a modification of the brown coconut - The green coconuts are a modification of the brown coconut
- The date cake batter is a modification of the acorn muffin batter - The date cake batter is a modification of the acorn muffin batter
All sapling textures (textures/*_sapling.png): All other sapling textures (textures/*_sapling.png):
© 2013, Tim Huppertz <mitroman@naturalnet.de> © 2013, Tim Huppertz <mitroman@naturalnet.de>
Published under the terms and conditions of CC-BY-SA-3.0 Unported. Published under the terms and conditions of CC-BY-SA-3.0 Unported.
All other textures: All other textures:

View File

@ -196,6 +196,97 @@ moretrees.cedar_biome = {
max_count = 10, max_count = 10,
} }
-- Poplar requires a lot of water.
moretrees.poplar_biome = {
surface = "default:dirt_with_grass",
avoid_nodes = moretrees.avoidnodes,
avoid_radius = 6,
seed_diff = 341,
min_elevation = 0,
max_elevation = 50,
near_nodes = {"default:water_source"},
near_nodes_size = 15,
near_nodes_vertical = 5,
near_nodes_count = 1,
humidity_min = -0.7,
humidity_max = -1,
rarity = 50,
max_count = 15,
}
-- The humidity requirement it quite restrictive (apparently).
-- Spawn an occasional poplar elsewhere.
moretrees.poplar_biome_2 = {
surface = "default:dirt_with_grass",
avoid_nodes = moretrees.avoidnodes,
avoid_radius = 6,
seed_diff = 341,
min_elevation = 0,
max_elevation = 50,
near_nodes = {"default:water_source"},
near_nodes_size = 15,
near_nodes_vertical = 4,
near_nodes_count = 10,
humidity_min = 0.1,
humidity_max = -0.6,
rarity = 50,
max_count = 1,
}
-- Subterranean lakes provide enough water for poplars to grow
moretrees.poplar_biome_3 = {
surface = "default:dirt_with_grass",
avoid_nodes = moretrees.avoidnodes,
avoid_radius = 6,
seed_diff = 342,
min_elevation = 0,
max_elevation = 50,
near_nodes = {"default:water_source"},
near_nodes_size = 1,
near_nodes_vertical = 25,
near_nodes_count = 1,
humidity_min = -0.5,
humidity_max = -1,
rarity = 0,
max_count = 30,
}
moretrees.poplar_small_biome = {
surface = "default:dirt_with_grass",
avoid_nodes = moretrees.avoidnodes,
avoid_radius = 4,
seed_diff = 343,
min_elevation = 0,
max_elevation = 50,
near_nodes = {"default:water_source"},
near_nodes_size = 10,
near_nodes_vertical = 5,
near_nodes_count = 1,
humidity_min = -0.7,
humidity_max = -1,
rarity = 50,
max_count = 10,
}
moretrees.poplar_small_biome_2 = {
surface = "default:dirt_with_grass",
avoid_nodes = moretrees.avoidnodes,
avoid_radius = 4,
seed_diff = 343,
min_elevation = 0,
max_elevation = 50,
near_nodes = {"default:water_source"},
near_nodes_size = 10,
near_nodes_vertical = 4,
near_nodes_count = 5,
humidity_min = 0.1,
humidity_max = -0.6,
rarity = 50,
max_count = 3,
}
moretrees.fir_biome = { moretrees.fir_biome = {
surface = "default:dirt_with_grass", surface = "default:dirt_with_grass",
avoid_nodes = moretrees.avoidnodes, avoid_nodes = moretrees.avoidnodes,

View File

@ -15,6 +15,7 @@ moretrees.enable_birch = true
moretrees.enable_spruce = true moretrees.enable_spruce = true
moretrees.enable_jungle_tree = true moretrees.enable_jungle_tree = true
moretrees.enable_fir = true moretrees.enable_fir = true
moretrees.enable_poplar = true
moretrees.enable_beech = false moretrees.enable_beech = false
-- set this to true to make moretrees spawn saplings at mapgen time instead -- set this to true to make moretrees spawn saplings at mapgen time instead

View File

@ -97,6 +97,8 @@ if moretrees.spawn_saplings then
moretrees.spawn_jungletree_object = "moretrees:jungletree_sapling_ongen" moretrees.spawn_jungletree_object = "moretrees:jungletree_sapling_ongen"
moretrees.spawn_fir_object = "moretrees:fir_sapling_ongen" moretrees.spawn_fir_object = "moretrees:fir_sapling_ongen"
moretrees.spawn_fir_snow_object = "snow:sapling_pine" moretrees.spawn_fir_snow_object = "snow:sapling_pine"
moretrees.spawn_poplar_object = "moretrees:poplar_sapling_ongen"
moretrees.spawn_poplar_small_object = "moretrees:poplar_small_sapling_ongen"
else else
moretrees.spawn_beech_object = moretrees.beech_model moretrees.spawn_beech_object = moretrees.beech_model
moretrees.spawn_apple_tree_object = moretrees.apple_tree_model moretrees.spawn_apple_tree_object = moretrees.apple_tree_model
@ -113,6 +115,8 @@ else
moretrees.spawn_jungletree_object = "moretrees.grow_jungletree" moretrees.spawn_jungletree_object = "moretrees.grow_jungletree"
moretrees.spawn_fir_object = "moretrees.grow_fir" moretrees.spawn_fir_object = "moretrees.grow_fir"
moretrees.spawn_fir_snow_object = "moretrees.grow_fir_snow" moretrees.spawn_fir_snow_object = "moretrees.grow_fir_snow"
moretrees.spawn_poplar_object = moretrees.poplar_model
moretrees.spawn_poplar_small_object = moretrees.poplar_small_model
end end
if moretrees.enable_beech then if moretrees.enable_beech then
@ -175,6 +179,14 @@ if moretrees.enable_fir then
end end
end end
if moretrees.enable_poplar then
biome_lib:register_generate_plant(moretrees.poplar_biome, moretrees.spawn_poplar_object)
biome_lib:register_generate_plant(moretrees.poplar_biome_2, moretrees.spawn_poplar_object)
biome_lib:register_generate_plant(moretrees.poplar_biome_3, moretrees.spawn_poplar_object)
biome_lib:register_generate_plant(moretrees.poplar_small_biome, moretrees.spawn_poplar_small_object)
biome_lib:register_generate_plant(moretrees.poplar_small_biome_2, moretrees.spawn_poplar_small_object)
end
-- Code to spawn a birch tree -- Code to spawn a birch tree
function moretrees.grow_birch(pos) function moretrees.grow_birch(pos)

View File

@ -12,6 +12,8 @@ moretrees.treelist = {
{"date_palm", "Date Palm Tree", "date_palm_fruit_trunk", "Date Palm Tree", {0, 0, 0, 0, 0, 0}, 0.0 }, {"date_palm", "Date Palm Tree", "date_palm_fruit_trunk", "Date Palm Tree", {0, 0, 0, 0, 0, 0}, 0.0 },
{"spruce", "Spruce Tree", "spruce_cone", "Spruce Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 }, {"spruce", "Spruce Tree", "spruce_cone", "Spruce Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
{"cedar", "Cedar Tree", "cedar_cone", "Cedar Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 }, {"cedar", "Cedar Tree", "cedar_cone", "Cedar Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
{"poplar", "Poplar Tree"},
{"poplar_small", "Poplar Tree"},
{"willow", "Willow Tree"}, {"willow", "Willow Tree"},
{"rubber_tree", "Rubber Tree"}, {"rubber_tree", "Rubber Tree"},
{"fir", "Douglas Fir", "fir_cone", "Fir Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 }, {"fir", "Douglas Fir", "fir_cone", "Fir Cone", {-0.2, -0.5, -0.2, 0.2, 0, 0.2}, 0.8 },
@ -72,6 +74,7 @@ for i in ipairs(moretrees.treelist) do
if treename ~= "jungletree" -- the default game provides jungle tree, acacia, and pine trunk/planks nodes. if treename ~= "jungletree" -- the default game provides jungle tree, acacia, and pine trunk/planks nodes.
and treename ~= "acacia" and treename ~= "acacia"
and treename ~= "poplar_small"
and treename ~= "pine" then and treename ~= "pine" then
saptex = "moretrees_"..treename.."_sapling.png" saptex = "moretrees_"..treename.."_sapling.png"
@ -273,6 +276,43 @@ for i in ipairs(moretrees.treelist) do
end end
end end
-- Add small poplar saplings
local poplar_sapling = minetest.registered_nodes["moretrees:poplar_sapling"]
local poplar_sapling_ongen = minetest.registered_nodes["moretrees:poplar_sapling_ongen"]
local poplar_small_sapling = {}
local poplar_small_sapling_ongen = {}
for k,v in pairs(poplar_sapling) do
poplar_small_sapling[k] = v
end
for k,v in pairs(poplar_sapling_ongen) do
poplar_small_sapling_ongen[k] = v
end
poplar_small_sapling.tiles = {"moretrees_poplar_small_sapling.png"}
poplar_small_sapling.inventory_image = "moretrees_poplar_small_sapling.png"
poplar_small_sapling_ongen.tiles_ongen = {"moretrees_poplar_small_sapling.png"}
poplar_small_sapling_ongen.inventory_image_ongen = "moretrees_poplar_small_sapling.png"
poplar_small_sapling_ongen.drop = "moretrees:poplar_small_sapling"
minetest.register_node("moretrees:poplar_small_sapling", poplar_small_sapling)
minetest.register_node("moretrees:poplar_small_sapling_ongen", poplar_small_sapling_ongen)
if moretrees.spawn_saplings then
table.insert(moretrees.avoidnodes, "moretrees:poplar_sapling")
table.insert(moretrees.avoidnodes, "moretrees:poplar_small_sapling_ongen")
end
local poplar_leaves_drop = minetest.registered_nodes["moretrees:poplar_leaves"].drop
minetest.override_item("moretrees:poplar_leaves", {
drop = {
max_items = poplar_leaves_drop.maxitems,
items = {
{items = {"moretrees:poplar_sapling"}, rarity = 1.33 * poplar_leaves_drop.items[1].rarity },
{items = {"moretrees:poplar_small_sapling"}, rarity = 1.33 * poplar_leaves_drop.items[1].rarity },
{items = {"moretrees:poplar_leaves"} }
}
}
})
-- Extra nodes for jungle trees: -- Extra nodes for jungle trees:
local jungleleaves = {"yellow","red"} local jungleleaves = {"yellow","red"}

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 347 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 980 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 751 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

View File

@ -18,6 +18,7 @@ willow - 5 to + 5 n/a water, 15 5 dirt_with grass 337 20
acacia n/a n/a n/a n/a dirt_with_grass, acacia n/a n/a n/a n/a dirt_with_grass,
desert_sand n/a 15 desert_sand n/a 15
rubber - 5 to + 5 above +32 water, 15 10 dirt_with_grass 338 20 rubber - 5 to + 5 above +32 water, 15 10 dirt_with_grass 338 20
poplar n/a -10 to +26 water, 15h,5v 1 dirt_with_grass 341,342,343 10
beech n/a n/a n/a n/a dirt_with_grass 2 10 beech n/a n/a n/a n/a dirt_with_grass 2 10

View File

@ -43,6 +43,37 @@ moretrees.oak_model={
fruit_chance=3, fruit_chance=3,
} }
moretrees.poplar_model={
axiom="TTTaaBCCCCCCCCCCCcccBBB[[f]&&G++f++Gf++Gf++Gf++G--]G[[f]&&G++f++Gf++Gf++Gf++G--]Gff",
rules_a="T",
rules_b="[[T]&&G++f++ff++ff++ff++f--]G",
rules_c="[[T]&&G++f++ff++ff++ff++f--G++[d]G[d]G++G[d]G[d]G[d]G++G[d]G[d]G[d]G++G[d]G[d]G[d]G++G[d]G]G",
rules_d="f",
trunk="air",
trunk="moretrees:poplar_trunk",
leaves="moretrees:poplar_leaves",
angle=45,
iterations=0,
random_level=0,
trunk_type="single",
thin_branches=false,
}
moretrees.poplar_small_model={
axiom="TT[T]BCCCCccBBff",
rules_a="T",
rules_b="[[f]&&G++f++Gf++Gf++Gf++G--]G",
rules_c="[[T]&&G++f++[d]Gf++[d]Gf++[d]Gf++[d]G--]G",
rules_d="f",
trunk="moretrees:poplar_trunk",
leaves="moretrees:poplar_leaves",
angle=45,
iterations=0,
random_level=0,
trunk_type="single",
thin_branches=false,
}
moretrees.sequoia_model={ moretrees.sequoia_model={
axiom="FFFFFFFFFFddccA///cccFddcFA///ddFcFA/cFFddFcdBddd/A/ccdcddd/ccAddddcFBcccAccFdFcFBcccc/BFdFFcFFdcccc/B", axiom="FFFFFFFFFFddccA///cccFddcFA///ddFcFA/cFFddFcdBddd/A/ccdcddd/ccAddddcFBcccAccFdFcFBcccc/BFdFFcFFdcccc/B",
rules_a="[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]", rules_a="[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]////[&&&GGF[++^FFdd][--&Fddd]//Fdd[+^Fd][--&Fdd]]",