1
0
mirror of https://github.com/luanti-org/minetest_game.git synced 2025-10-21 20:15:44 +02:00

Refactor a bit to be more concise

This commit is contained in:
Lars Mueller
2023-09-11 15:17:15 +02:00
parent b2a291fc4a
commit 78cd12d2eb
3 changed files with 39 additions and 104 deletions

View File

@@ -1041,9 +1041,7 @@ Trees
{
can_grow = default.can_grow, -- Function called to determine whether the sapling can grow, should return a boolean
on_grow_failed = default.on_grow_failed, -- Function called when the growth fails
grow_callback = function(pos) -- Function called when the growth has success. Conventionally, this should replace the sapling with a tree
default.grow_tree(pos, random(1, 4) == 1)
end
grow = function(pos) -- Function called when the growth has success. This should replace the sapling with a tree.
}
)
* default.grow_sapling(pos)