From: orbea Date: Tue, 7 Apr 2020 17:36:03 +0000 (+0000) Subject: trees: Reduce local variables (#2637) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=14a385d68c1bb4f67b5d9281893574c8b05fe9b3;p=oweals%2Fminetest_game.git trees: Reduce local variables (#2637) --- 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)