trees: Reduce local variables (#2637)

This commit is contained in:
orbea 2020-04-07 17:36:03 +00:00 committed by GitHub
parent 03c9aed221
commit 14a385d68c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,9 +16,7 @@ function default.can_grow(pos)
if not node_under then if not node_under then
return false return false
end end
local name_under = node_under.name if minetest.get_item_group(node_under.name, "soil") == 0 then
local is_soil = minetest.get_item_group(name_under, "soil")
if is_soil == 0 then
return false return false
end end
local light_level = minetest.get_node_light(pos) local light_level = minetest.get_node_light(pos)