From e1edcd982e7f817845040716f09961c89722fc43 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 16 Nov 2016 06:35:24 +0100 Subject: Change x_doc_items_* to _doc_items_* --- API.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'API.md') diff --git a/API.md b/API.md index 0f6da3c..1a60f56 100644 --- a/API.md +++ b/API.md @@ -13,17 +13,17 @@ hand-written help texts for your items. The preferred way is to add the following optional fields to the item definition when using `minetest.register_node`, etc.: -* `x_doc_items_longdesc`: Long description of this item. +* `_doc_items_longdesc`: Long description of this item. Describe here what this item is, what it is for, its purpose, etc. -* `x_doc_items_usagehelp`: Description of *how* this item can be used. +* `_doc_items_usagehelp`: Description of *how* this item can be used. Only set this if needed, e.g. standard mining tools don't need this. Example: minetest.register_node("example:dice", { description = "Dice", - x_doc_items_longdesc = "A decorative dice which shows the numbers 1-6 on its sides.", - x_doc_items_usagehelp = "Rightclick the dice to roll it.", + _doc_items_longdesc = "A decorative dice which shows the numbers 1-6 on its sides.", + _doc_items_usagehelp = "Rightclick the dice to roll it.", tiles = { "example_dice.png" }, is_ground_content = false, --[[ and so on … ]] @@ -167,12 +167,12 @@ If this is not possible, use `doc.sub.items.add_hidden_item_entries`. ## New item fields This mod adds support for new fields of the item definition: -* `x_doc_items_longdesc`: Long description -* `x_doc_items_usagehelp`: Usage help -* `x_doc_items_image`: Entry image (default: inventory image) -* `x_doc_items_hidden`: Whether entry is hidden (default: `false` for Air, `true` for everything else) -* `x_doc_items_create_entry`: Whether to create an entry for this item (default: `true`) -* `x_doc_items_entry_name`: The title of the entry. By default, this is the same as the `description` field +* `_doc_items_longdesc`: Long description +* `_doc_items_usagehelp`: Usage help +* `_doc_items_image`: Entry image (default: inventory image) +* `_doc_items_hidden`: Whether entry is hidden (default: `false` for Air, `true` for everything else) +* `_doc_items_create_entry`: Whether to create an entry for this item (default: `true`) +* `_doc_items_entry_name`: The title of the entry. By default, this is the same as the `description` field of the item, or “Nameless entry” if it is `nil`. ## Functions @@ -184,7 +184,7 @@ a table where the keys are the itemstrings and the values are the the description strings for each item. Note the preferred method to set the long description is by using -the item definition field `x_doc_items_longdesc`. +the item definition field `_doc_items_longdesc`. This function is intended to be used to set the long description for items which your mods do not register by themselves. -- cgit v1.2.3