From: SmallJoker Date: Tue, 27 Dec 2016 15:18:49 +0000 (+0100) Subject: Papyrus, cactus: Require light level 13 for growth X-Git-Tag: 0.4.16~116 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8bc93598c625f18950eff402bc54030b426b5db9;p=oweals%2Fminetest_game.git Papyrus, cactus: Require light level 13 for growth --- diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 3bda4bf0..11c42d59 100644 --- 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