summaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2016-11-03 03:21:47 +0100
committerWuzzy <almikes@aol.com>2016-11-03 03:21:47 +0100
commit84b045e86fabc871cadd9b236c27c3f99f4e4972 (patch)
tree14581c470ecc9da326f27c8ef7fbb56aa2650608 /API.md
parenta080fd45f924f6502c2d296529dff730ad71807f (diff)
Export group names
Diffstat (limited to 'API.md')
-rw-r--r--API.md17
1 files changed, 10 insertions, 7 deletions
diff --git a/API.md b/API.md
index 4cf5445..0f6da3c 100644
--- a/API.md
+++ b/API.md
@@ -270,6 +270,14 @@ Minetest as it does not support “friendly” group names, which means exposing
groups to an interface is not pretty. Therefore, this function may be
deprecated when Minetest supports such a thing.
+### `doc.sub.items.get_group_name(internal_group_name)`
+Returns the group name of the specified group as displayed by this mod.
+If the setting `doc_items_friendly_group_names` is `true`, this might
+return a “friendly” group name (see above). If no friendly group name
+exists, `internal_group_name` is returned.
+If `doc_items_friendly_group_names` is `false`, the argument is always
+returned.
+
### `doc.sub.items.add_notable_groups(groupnames)`
Add a list of groups you think are notable enough to be mentioned in the
“This item belongs to the following groups: (…)” factoid.
@@ -300,13 +308,6 @@ The intention of this function is to give a short rundown of the groups
which are notable as they are important to gameplay in some way yet don't
deserve a full-blown factoid.
-### `doc.sub.items.add_notable_groups(groupnames)`
-Declare a number of groups as mining groups, that is, groups which are
-primarily used for determining mining times. They will appear in the
-“Mining capabilities” factoid.
-
-`groupnames` is a table of group names.
-
### `doc.sub.items.add_forced_item_entries(itemstrings)`
Adds items which will be forced to be added to the entry list, even if
the item is not in creative inventory.
@@ -358,3 +359,5 @@ It is possible to override **these** names, just use the function normally.
["farming:wheat_8"] = "Wheat Plant", -- Item description was empty
["example:node"] = "My Custom Name",
})
+
+