Add item documentation

This commit is contained in:
Wuzzy 2016-08-07 18:02:56 +02:00
parent f47171e432
commit bcf61bb966
2 changed files with 12 additions and 2 deletions

@ -1,3 +1,4 @@
farming?
pedology?
intllib?
doc_items?

@ -61,8 +61,8 @@ minetest.register_tool("wateringcan:wateringcan_water", {
return newtool
end
end
end
end,
groups = { not_in_doc = 1 },
}
)
@ -86,3 +86,12 @@ minetest.register_tool("wateringcan:wateringcan_empty", {
end
end
})
if minetest.get_modpath("doc_items") ~= nil then
local d = S("Watering cans are used to collect a small amount of water in order to pour it on dry blocks. One filled watering can can be used 24 times, after which it has to be refilled. Watering cans don't wear out.")
local u = S("Rightclick on water (or any other block belonging to the “Water” group) to fill or refill the watering can. Rightclick with the filled can on an appropriate block (or a plant above it) to wetten it. Soil, desert sand soil, and other blocks capable of becoming wet can be wettened. The tool wear indicator of the watering can indicates the amount of water left.")
doc.sub.items.add_item_name_overrides({["wateringcan:wateringcan_empty"] = S("Watering can")})
doc.add_entry_alias("tools", "wateringcan:wateringcan_empty", "wateringcan:wateringcan_water")
doc.sub.items.set_items_longdesc({["wateringcan:wateringcan_empty"] = d, ["wateringcan:wateringcan_water"] = d})
doc.sub.items.set_items_usagehelp({["wateringcan:wateringcan_empty"] = u, ["wateringcan:wateringcan_water"] = u})
end