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:
c15bd9d
)
Default/trees: Add requirement of light level 13 for sapling growth
author
paramat
<mat.gregory@virginmedia.com>
Fri, 16 Oct 2015 10:51:27 +0000
(11:51 +0100)
committer
paramat
<mat.gregory@virginmedia.com>
Sat, 17 Oct 2015 08:41:17 +0000
(09:41 +0100)
mods/default/trees.lua
patch
|
blob
|
history
diff --git
a/mods/default/trees.lua
b/mods/default/trees.lua
index 07cc4d73752c8c537de84f764573ddb4f69d3b62..5f50b040a36b68b7258f2add92cf7ba89b76e7d3 100644
(file)
--- a/
mods/default/trees.lua
+++ b/
mods/default/trees.lua
@@
-16,6
+16,10
@@
local function can_grow(pos)
if is_soil == 0 then
return false
end
+ local ll = minetest.get_node_light(pos)
+ if not ll or ll < 13 then -- Minimum light level for growth
+ return false -- matches grass, wheat and cotton
+ end
return true
end