Fix flowers detection when using ethereal
This commit is contained in:
parent
c6e134873d
commit
b440a37a2e
@ -35,12 +35,22 @@ signs_bot.register_flower("default:acacia_bush_stem")
|
|||||||
signs_bot.register_flower("default:pine_bush_stem")
|
signs_bot.register_flower("default:pine_bush_stem")
|
||||||
|
|
||||||
minetest.after(1, function()
|
minetest.after(1, function()
|
||||||
|
local function add_flower(name)
|
||||||
|
local def = minetest.registered_nodes[name]
|
||||||
|
if def and (def.groups.mushroom == 1 or def.groups.flower == 1) then
|
||||||
|
signs_bot.register_flower(name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
for _,def in pairs(minetest.registered_decorations) do
|
for _,def in pairs(minetest.registered_decorations) do
|
||||||
local name = def.decoration
|
local name = def.decoration
|
||||||
if name and type(name) == "string" then
|
if name then
|
||||||
local mod = string.split(name, ":")[1]
|
if type(name) == "string" then
|
||||||
if mod == "flowers" or mod == "bakedclay" then -- Bakedclay also registers flowers as decoration.
|
add_flower(name)
|
||||||
signs_bot.register_flower(name)
|
elseif type(name) == "table" then
|
||||||
|
for _,sub_name in ipairs(name) do
|
||||||
|
add_flower(sub_name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user