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:
f07c4dc
)
Papyrus, cactus: Require light level 13 for growth
author
SmallJoker
<mk939@ymail.com>
Tue, 27 Dec 2016 15:18:49 +0000
(16:18 +0100)
committer
paramat
<mat.gregory@virginmedia.com>
Mon, 2 Jan 2017 18:30:05 +0000
(18:30 +0000)
mods/default/functions.lua
patch
|
blob
|
history
diff --git
a/mods/default/functions.lua
b/mods/default/functions.lua
index 3bda4bf036f487d09bf73b845ad50442aa0c2638..11c42d5928877b5b34ac7188ec082d4c2b99ac04 100644
(file)
--- a/
mods/default/functions.lua
+++ b/
mods/default/functions.lua
@@
-186,6
+186,9
@@
function default.grow_cactus(pos, node)
if height == 4 or node.name ~= "air" then
return
end
+ if minetest.get_node_light(pos) < 13 then
+ return
+ end
minetest.set_node(pos, {name = "default:cactus"})
return true
end
@@
-209,6
+212,9
@@
function default.grow_papyrus(pos, node)
if height == 4 or node.name ~= "air" then
return
end
+ if minetest.get_node_light(pos) < 13 then
+ return
+ end
minetest.set_node(pos, {name = "default:papyrus"})
return true
end