d1c1c3bfac
* added simple leaf growing, leave occupy free adjacent space next to growng trunks * addded leaves node
31 lines
630 B
Lua
31 lines
630 B
Lua
ebiometrees = {}
|
|
|
|
function ebiometrees.is_leaves_can_grow_here(pos)
|
|
return false
|
|
end
|
|
|
|
function ebiometrees.grow_closure(nextstage)
|
|
local function growtree(pos)
|
|
minetest.set_node(pos, {name=nextstage})
|
|
end
|
|
return growtree
|
|
end
|
|
|
|
function ebiometrees.leaves_grower(leaves_name)
|
|
local function grow_leaves(pos)
|
|
local free_node = minetest.find_node_near(pos, 1, "air")
|
|
if free_node
|
|
then
|
|
minetest.set_node(free_node, {name=leaves_name})
|
|
end
|
|
return true
|
|
end
|
|
return grow_leaves
|
|
end
|
|
|
|
function ebiometrees.root_sapling(pos)
|
|
minetest.set_node(pos, {name="ebiome:oak_sprout"})
|
|
return false
|
|
end
|
|
|