Extra error checking.
This commit is contained in:
parent
aa999e2ed5
commit
bf26b8bee1
25 changed files with 897 additions and 314 deletions
|
@ -39,6 +39,10 @@ minetest.register_node("fun_caves:fungal_tree_fruit", {
|
|||
local fruit = minetest.get_content_id("fun_caves:fungal_tree_fruit")
|
||||
|
||||
function fun_caves.make_fungal_tree(data, area, ivm, height)
|
||||
if not (data and area and ivm and height and type(data) == 'table' and type(ivm) == 'number' and type(height) == 'number') then
|
||||
return
|
||||
end
|
||||
|
||||
local leaf = minetest.get_content_id(fungal_tree_leaves[math.random(#fungal_tree_leaves)])
|
||||
local air = minetest.get_content_id('air')
|
||||
for y = 0, height do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue