Update flower help
This commit is contained in:
parent
df446efb04
commit
12a02f9961
|
@ -46,6 +46,15 @@ doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def)
|
||||||
return datastring
|
return datastring
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- flower
|
||||||
|
doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def)
|
||||||
|
local datastring = ""
|
||||||
|
if def.groups.flower == 1 then
|
||||||
|
return "This is a flower which can grow on dirt, grass blocks and podzol. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher."
|
||||||
|
end
|
||||||
|
return ""
|
||||||
|
end)
|
||||||
|
|
||||||
-- flammable
|
-- flammable
|
||||||
doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def)
|
doc.sub.items.register_factoid("nodes", "groups", function(itemstring, def)
|
||||||
if def.groups.flammable then
|
if def.groups.flammable then
|
||||||
|
|
|
@ -5,6 +5,7 @@ flower_tmp={}
|
||||||
|
|
||||||
-- Simple flower template
|
-- Simple flower template
|
||||||
local smallflowerlongdesc = "This is a small flower. Small flowers are mainly used for dye production and can also be potted."
|
local smallflowerlongdesc = "This is a small flower. Small flowers are mainly used for dye production and can also be potted."
|
||||||
|
local flowerusagehelp = "It can only be placed on a block on which it would also survive."
|
||||||
|
|
||||||
-- on_place function for flowers
|
-- on_place function for flowers
|
||||||
local on_place_flower = mcl_util.generate_on_place_plant_function(function(pos, node)
|
local on_place_flower = mcl_util.generate_on_place_plant_function(function(pos, node)
|
||||||
|
@ -29,6 +30,7 @@ local function add_simple_flower(name, desc, image, simple_selection_box)
|
||||||
minetest.register_node("mcl_flowers:"..name, {
|
minetest.register_node("mcl_flowers:"..name, {
|
||||||
description = desc,
|
description = desc,
|
||||||
_doc_items_longdesc = smallflowerlongdesc,
|
_doc_items_longdesc = smallflowerlongdesc,
|
||||||
|
_doc_items_usagehelp = flowerusagehelp,
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = { image..".png" },
|
tiles = { image..".png" },
|
||||||
inventory_image = image..".png",
|
inventory_image = image..".png",
|
||||||
|
@ -141,16 +143,18 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
||||||
if not inv_img then
|
if not inv_img then
|
||||||
inv_img = top_img
|
inv_img = top_img
|
||||||
end
|
end
|
||||||
local flowergroup
|
local flowergroup, usagehelp
|
||||||
if is_flower == nil then
|
if is_flower == nil then
|
||||||
is_flower = true
|
is_flower = true
|
||||||
end
|
end
|
||||||
if is_flower then
|
if is_flower then
|
||||||
flowergroup = 1
|
flowergroup = 1
|
||||||
|
usagehelp = flowerusagehelp
|
||||||
end
|
end
|
||||||
minetest.register_node("mcl_flowers:"..name, {
|
minetest.register_node("mcl_flowers:"..name, {
|
||||||
description = desc,
|
description = desc,
|
||||||
_doc_items_longdesc = longdesc,
|
_doc_items_longdesc = longdesc,
|
||||||
|
_doc_items_usagehelp = usagehelp,
|
||||||
drawtype = "plantlike",
|
drawtype = "plantlike",
|
||||||
tiles = { bottom_img },
|
tiles = { bottom_img },
|
||||||
inventory_image = inv_img,
|
inventory_image = inv_img,
|
||||||
|
|
Loading…
Reference in New Issue