From 321bd6672113232817774670c9be89d22aecd956 Mon Sep 17 00:00:00 2001 From: paramat Date: Tue, 27 Oct 2015 01:10:25 +0000 Subject: [PATCH] Default/trees: Clean-up 'can grow' function --- mods/default/trees.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mods/default/trees.lua b/mods/default/trees.lua index 5f50b040..c6bb489d 100644 --- a/mods/default/trees.lua +++ b/mods/default/trees.lua @@ -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 -- 2.25.1