1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-11-16 06:50:18 +01:00

Papyrus, cactus: Require light level 13 for growth

This commit is contained in:
SmallJoker 2016-12-27 16:18:49 +01:00 committed by paramat
parent f07c4dcd83
commit 8bc93598c6

View File

@ -186,6 +186,9 @@ function default.grow_cactus(pos, node)
if height == 4 or node.name ~= "air" then if height == 4 or node.name ~= "air" then
return return
end end
if minetest.get_node_light(pos) < 13 then
return
end
minetest.set_node(pos, {name = "default:cactus"}) minetest.set_node(pos, {name = "default:cactus"})
return true return true
end end
@ -209,6 +212,9 @@ function default.grow_papyrus(pos, node)
if height == 4 or node.name ~= "air" then if height == 4 or node.name ~= "air" then
return return
end end
if minetest.get_node_light(pos) < 13 then
return
end
minetest.set_node(pos, {name = "default:papyrus"}) minetest.set_node(pos, {name = "default:papyrus"})
return true return true
end end