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
|
end
|
||||||
|
|
||||||
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
|
||||||
|
if not Ignore[name] then
|
||||||
|
techage.register_flower(name)
|
||||||
|
end
|
||||||
|
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 type(name) == "string" then
|
||||||
local mod = string.split(name, ":")[1]
|
add_flower(name)
|
||||||
if mod == "flowers" or mod == "bakedclay" then -- Bakedclay also registers flowers as decoration.
|
elseif type(name) == "table" then
|
||||||
if not Ignore[name] then
|
for _,sub_name in ipairs(name) do
|
||||||
techage.register_flower(name)
|
add_flower(sub_name)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -213,5 +221,4 @@ minetest.after(1, function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- print(dump(Flowers))
|
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user