From 085b36f044dde2c5c1a6c4ff1154c708c8376784 Mon Sep 17 00:00:00 2001 From: Michal Cieslakiewicz Date: Sat, 28 Nov 2020 14:50:07 +0100 Subject: [PATCH] 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 --- lamps/growlight.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lamps/growlight.lua b/lamps/growlight.lua index 5c5c98a..ffbb4b4 100644 --- a/lamps/growlight.lua +++ b/lamps/growlight.lua @@ -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