From 14a385d68c1bb4f67b5d9281893574c8b05fe9b3 Mon Sep 17 00:00:00 2001 From: orbea Date: Tue, 7 Apr 2020 17:36:03 +0000 Subject: [PATCH] trees: Reduce local variables (#2637) --- mods/default/trees.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mods/default/trees.lua b/mods/default/trees.lua index ad3e3f4c..a850644c 100644 --- a/mods/default/trees.lua +++ b/mods/default/trees.lua @@ -16,9 +16,7 @@ function default.can_grow(pos) if not node_under then return false end - local name_under = node_under.name - local is_soil = minetest.get_item_group(name_under, "soil") - if is_soil == 0 then + if minetest.get_item_group(node_under.name, "soil") == 0 then return false end local light_level = minetest.get_node_light(pos) -- 2.25.1