Skip to content
Permalink
Browse files

Papyrus, cactus: Require light level 13 for growth

  • Loading branch information
SmallJoker authored and paramat committed Dec 27, 2016
1 parent f07c4dc commit 8bc93598c625f18950eff402bc54030b426b5db9
Showing with 6 additions and 0 deletions.
  1. +6 −0 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

0 comments on commit 8bc9359

Please sign in to comment.
You can’t perform that action at this time.