growlight: do not grow waterlily on soil

Ignore waterlily as growable flower under growlight. This plant
should be floating on water. Furthermore, it is completely transparent
when grown on soil, giving player a false impression of empty space
there (unless F5 debug mode is used).

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
master
Michal Cieslakiewicz 2020-11-28 14:50:07 +01:00
parent 21d583b7dd
commit 085b36f044
1 changed files with 7 additions and 2 deletions

View File

@ -20,6 +20,7 @@ local Cable = techage.ElectricCable
local power = techage.power
local Flowers = {}
local Plants = {}
local Ignore = { ["flowers:waterlily_waving"] = true }
-- 9 plant positions below the light
local Positions = {
{x = 0, y =-1, z = 0},
@ -143,7 +144,9 @@ minetest.after(1, function()
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.
techage.register_flower(name)
if not Ignore[name] then
techage.register_flower(name)
end
end
end
end
@ -151,7 +154,9 @@ minetest.after(1, function()
if type(name) == "string" then
local mod = string.split(name, ":")[1]
if mod == "farming" and ndef.on_timer then -- probably a plant that still needs to grow
techage.register_plant(name)
if not Ignore[name] then
techage.register_plant(name)
end
end
end
end