Merge pull request #178 from Niklp09/fix_flower_detection
Fix flowers detection when using ethereal
This commit is contained in:
commit
885d25a4a9
@ -192,14 +192,22 @@ function techage.register_plant(name)
|
||||
end
|
||||
|
||||
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
|
||||
if not Ignore[name] then
|
||||
techage.register_flower(name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for _,def in pairs(minetest.registered_decorations) do
|
||||
local name = def.decoration
|
||||
if name and type(name) == "string" then
|
||||
local mod = string.split(name, ":")[1]
|
||||
if mod == "flowers" or mod == "bakedclay" then -- Bakedclay also registers flowers as decoration.
|
||||
if not Ignore[name] then
|
||||
techage.register_flower(name)
|
||||
end
|
||||
if type(name) == "string" then
|
||||
add_flower(name)
|
||||
elseif type(name) == "table" then
|
||||
for _,sub_name in ipairs(name) do
|
||||
add_flower(sub_name)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -213,5 +221,4 @@ minetest.after(1, function()
|
||||
end
|
||||
end
|
||||
end
|
||||
-- print(dump(Flowers))
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user