Skip to content

Commit 8bc9359

Browse files
SmallJokerparamat
authored andcommittedJan 2, 2017
Papyrus, cactus: Require light level 13 for growth
1 parent f07c4dc commit 8bc9359

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎mods/default/functions.lua

+6
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ function default.grow_cactus(pos, node)
186186
if height == 4 or node.name ~= "air" then
187187
return
188188
end
189+
if minetest.get_node_light(pos) < 13 then
190+
return
191+
end
189192
minetest.set_node(pos, {name = "default:cactus"})
190193
return true
191194
end
@@ -209,6 +212,9 @@ function default.grow_papyrus(pos, node)
209212
if height == 4 or node.name ~= "air" then
210213
return
211214
end
215+
if minetest.get_node_light(pos) < 13 then
216+
return
217+
end
212218
minetest.set_node(pos, {name = "default:papyrus"})
213219
return true
214220
end

0 commit comments

Comments
 (0)
Please sign in to comment.