From: paramat Date: Mon, 23 Nov 2015 00:55:11 +0000 (+0000) Subject: Default/trees: Make 'can grow' public to enable over-riding X-Git-Tag: 0.4.14~185 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=135d80eb8604721d103a2bdf9b402f3b466447c9;p=oweals%2Fminetest_game.git Default/trees: Make 'can grow' public to enable over-riding --- diff --git a/mods/default/trees.lua b/mods/default/trees.lua index c6bb489d..51a7a2e6 100644 --- a/mods/default/trees.lua +++ b/mods/default/trees.lua @@ -6,7 +6,7 @@ local random = math.random -local function can_grow(pos) +function default.can_grow(pos) local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z}) if not node_under then return false @@ -32,7 +32,7 @@ minetest.register_abm({ interval = 10, chance = 50, action = function(pos, node) - if not can_grow(pos) then + if not default.can_grow(pos) then return end