Update doc_items helptexts
This commit is contained in:
parent
659bcf5501
commit
d1efb34532
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user