mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-06 05:44:26 -04:00
Update trees.lua
This commit is contained in:
parent
d248261faf
commit
b489d9a984
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,8 @@
|
||||||
-- 'Can grow' function
|
-- 'Can grow' function
|
||||||
|
|
||||||
local random = math.random
|
local random = math.random
|
||||||
|
local min_light_level = tonumber(minetest.setting_get("trees_min_light_level")) or 13
|
||||||
|
|
||||||
local function can_grow(pos)
|
local function can_grow(pos)
|
||||||
local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z})
|
local node_under = minetest.get_node_or_nil({x = pos.x, y = pos.y - 1, z = pos.z})
|
||||||
if not node_under then
|
if not node_under then
|
||||||
|
@ -17,7 +18,6 @@ local function can_grow(pos)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local light_level = minetest.get_node_light(pos)
|
local light_level = minetest.get_node_light(pos)
|
||||||
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
|
if not light_level or light_level < min_light_level then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue