projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03c9aed
)
trees: Reduce local variables (#2637)
author
orbea
<orbea@riseup.net>
Tue, 7 Apr 2020 17:36:03 +0000
(17:36 +0000)
committer
GitHub
<noreply@github.com>
Tue, 7 Apr 2020 17:36:03 +0000
(19:36 +0200)
mods/default/trees.lua
patch
|
blob
|
history
diff --git
a/mods/default/trees.lua
b/mods/default/trees.lua
index ad3e3f4c77911c6fd267e4087236f92f431972c8..a850644c389fbefe2354703ad1d1e1b8ad1a739f 100644
(file)
--- 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)