From d1efb3453204d5d76ac956e73a4db15199cc6d96 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 20 Dec 2016 12:19:21 +0100 Subject: [PATCH] Update doc_items helptexts --- doc_items.lua | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/doc_items.lua b/doc_items.lua index 3642102..8768078 100644 --- a/doc_items.lua +++ b/doc_items.lua @@ -1,4 +1,15 @@ --- Example to enhance the documentation for your items +--[[ This is the doc_items example. +This example shows how to add help texts to items and how to use +other frequently-used features of doc_items. +]] + +--[[ IMPORTANT REMINDER: doc_items mod will automatically generate help +entries for all items (a few exceptions apply) without your intervention. +doc_items already extracts a lot of item definition automatically. +The API is mainly concernd about enhancing the existing item entries. + +Hint: When using this example, use the `/help_reveal` +chat command to reveal all item entries (for testing) ]] --[[ HELP TEXTS ]] @@ -15,10 +26,6 @@ minetest.register_craftitem("doc_example:item1", { }) -- These are just more example items which we use for the factoids later ---[[ PLEASE NOTE: The doc_items mod will automatically generate help entries for -all items (a few exceptions apply) without your intervention. But they will start -out hidden. When using this example, use the `/help_reveal` command to reveal -all item entries (for testing) ]] minetest.register_craftitem("doc_example:item2", { description = "doc_example test item 2", group = { example = 2 }, @@ -35,6 +42,8 @@ minetest.register_tool("doc_example:tool", { -- This tool has an unique non-standard use (i.e. not mining, not melee combat, etc.), so we should add this field as well -- Read API.md of doc_items for guidelines to write good help texts _doc_items_usagehelp = "Punch to send a chat message.", + -- The tool entry will be visible for everyone at start + _doc_items_hidden = false, on_punch = function() minetest.chat_send_all("The doc_example chat tool has been used!") end, -- 2.11.4.GIT