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:
2729777
)
Default/trees: Clean-up 'can grow' function
author
paramat
<mat.gregory@virginmedia.com>
Tue, 27 Oct 2015 01:10:25 +0000
(
01:10
+0000)
committer
paramat
<mat.gregory@virginmedia.com>
Tue, 27 Oct 2015 01:51:54 +0000
(
01:51
+0000)
mods/default/trees.lua
patch
|
blob
|
history
diff --git
a/mods/default/trees.lua
b/mods/default/trees.lua
index 5f50b040a36b68b7258f2add92cf7ba89b76e7d3..c6bb489d1d1700dfb029dacfd75a73eeb4679b14 100644
(file)
--- 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 l
l or ll < 13 then -- Minimum light level for growth
- return false
-- matches grass, wheat and cotton
+ local l
ight_leve
l = minetest.get_node_light(pos)
+ if not l
ight_level or light_level < 13 then
+ return false
end
return true
end