Default/trees: Make 'can grow' public to enable over-riding
authorparamat <mat.gregory@virginmedia.com>
Mon, 23 Nov 2015 00:55:11 +0000 (00:55 +0000)
committerparamat <mat.gregory@virginmedia.com>
Mon, 23 Nov 2015 03:19:00 +0000 (03:19 +0000)
mods/default/trees.lua

index c6bb489d1d1700dfb029dacfd75a73eeb4679b14..51a7a2e6d832cc5f42975aec2581fb32c7731fe7 100644 (file)
@@ -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