mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-04 21:10:04 -04:00
configurable tree growth light level
Allow the tree's min light level for growth to be configurable in the config, but default to 13 if not defined.
This commit is contained in:
parent
e67e28d226
commit
d248261faf
1 changed files with 2 additions and 1 deletions
|
@ -17,7 +17,8 @@ local function can_grow(pos)
|
|||
return false
|
||||
end
|
||||
local light_level = minetest.get_node_light(pos)
|
||||
if not light_level or light_level < 13 then
|
||||
local min_light_level = tonumber(minetest.setting_get("trees_min_light_level")) or 13
|
||||
if not light_level or light_level < min_light_level then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
|
|
Loading…
Add table
Reference in a new issue