forked from mtcontrib/riesenpilz
Add a warning about string nodenames abm values, they should not occur
This commit is contained in:
parent
c3826283ea
commit
f594c91ca3
5
init.lua
5
init.lua
@ -1122,6 +1122,11 @@ local function get_grow(name)
|
|||||||
local is = {}
|
local is = {}
|
||||||
for i = 1,#minetest.registered_abms do
|
for i = 1,#minetest.registered_abms do
|
||||||
local ad = minetest.registered_abms[i]
|
local ad = minetest.registered_abms[i]
|
||||||
|
if type(ad.nodenames) ~= "table" then
|
||||||
|
minetest.log("warning", "ABM nodenames is not a table: " ..
|
||||||
|
dump(ad))
|
||||||
|
return
|
||||||
|
end
|
||||||
if ad.chance > 1
|
if ad.chance > 1
|
||||||
and table.indexof(ad.nodenames, name) ~= -1 then
|
and table.indexof(ad.nodenames, name) ~= -1 then
|
||||||
is[#is+1] = ad.action
|
is[#is+1] = ad.action
|
||||||
|
Loading…
Reference in New Issue
Block a user