From a080fd45f924f6502c2d296529dff730ad71807f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 3 Nov 2016 02:41:13 +0100 Subject: =?UTF-8?q?add=5Freal=5Fgroup=5Fnames=20=E2=86=92=20add=5Ffriendly?= =?UTF-8?q?=5Fgroup=5Fnames?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API.md | 4 ++-- init.lua | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/API.md b/API.md index f816ad9..4cf5445 100644 --- a/API.md +++ b/API.md @@ -256,7 +256,7 @@ to all blocks which are member of the group `puts_out_fire`. end end) -### `doc.sub.items.add_real_group_names(groupnames)` +### `doc.sub.items.add_friendly_group_names(groupnames)` Use this function so set some more readable group names to show them in the formspec, since the internal group names are somewhat cryptic to players. @@ -266,7 +266,7 @@ the values are the group names which will be actually shown in the Documentation System. ***Note***: This function is mostly there to work around a problem in -Minetest as it does not support “real” group names, which means exposing +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. diff --git a/init.lua b/init.lua index 9d170ef..12bbb70 100644 --- a/init.lua +++ b/init.lua @@ -888,8 +888,9 @@ function doc.sub.items.add_item_image_overrides(image_overrides) end -- Register group definition stuff --- “Real” group names to replace the rather technical names -function doc.sub.items.add_real_group_names(groupnames) +-- More (user-)friendly group names to replace the rather technical names +-- for better understanding +function doc.sub.items.add_friendly_group_names(groupnames) for internal, real in pairs(groupnames) do groupdefs[internal] = real end -- cgit v1.2.3