Default/trees: Clean-up 'can grow' function
authorparamat <mat.gregory@virginmedia.com>
Tue, 27 Oct 2015 01:10:25 +0000 (01:10 +0000)
committerparamat <mat.gregory@virginmedia.com>
Tue, 27 Oct 2015 01:51:54 +0000 (01:51 +0000)
mods/default/trees.lua

index 5f50b040a36b68b7258f2add92cf7ba89b76e7d3..c6bb489d1d1700dfb029dacfd75a73eeb4679b14 100644 (file)
@@ -16,9 +16,9 @@ local function can_grow(pos)
        if is_soil == 0 then
                return false
        end
-       local ll = minetest.get_node_light(pos)
-       if not ll or ll < 13 then -- Minimum light level for growth
-               return false          -- matches grass, wheat and cotton
+       local light_level = minetest.get_node_light(pos)
+       if not light_level or light_level < 13 then
+               return false
        end
        return true
 end