Add simple item description

master
Wuzzy 2016-08-13 12:04:11 +02:00
parent 4d12f6e86d
commit e4de7a788a
1 changed files with 11 additions and 2 deletions

View File

@ -29,7 +29,7 @@ ltool.default_edit_fields = {
--[[ This registers the sapling for planting the trees ]]
minetest.register_node("ltool:sapling", {
description = "custom L-system tree sapling",
description = "Custom L-system tree sapling",
stack_max = 1,
drawtype = "plantlike",
tiles = { "ltool_sapling.png" },
@ -39,7 +39,7 @@ minetest.register_node("ltool:sapling", {
paramtype2= "wallmounted",
walkable = false,
buildable_to = true,
groups = { dig_immediate = 3, not_in_creative_inventory=1 },
groups = { dig_immediate = 3, not_in_creative_inventory=1, in_doc=1 },
drop = "",
after_place_node = function(pos, placer, itemstack, pointed_thing)
-- Transfer metadata and start timer
@ -1271,3 +1271,12 @@ if minetest.get_modpath("unified_inventory") ~= nil then
end,
})
end
if minetest.get_modpath("doc_items") ~= nil then
doc.sub.items.set_items_longdesc({
["ltool:sapling"] = "This artificial sapling does not come from nature and contains the genome of a genetically engineered L-system tree. Every sapling of this kind is unique. Who knows what might grow from it when you plant it?",
})
doc.sub.items.set_items_usagehelp({
["ltool:sapling"] = "Place the sapling on any floor and wait 5 seconds for the tree to appear. To create your own saplings, you need to have the “lplant” privilege and pick a tree from the L-System Tree Utility (accessed with the server command “treeform”)."
})
end