add_real_group_names → add_friendly_group_names

This commit is contained in:
Wuzzy 2016-11-03 02:41:13 +01:00
parent 825d0cd20e
commit a080fd45f9
2 changed files with 5 additions and 4 deletions

4
API.md
View File

@ -256,7 +256,7 @@ to all blocks which are member of the group `puts_out_fire`.
end end
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 Use this function so set some more readable group names to show them
in the formspec, since the internal group names are somewhat cryptic in the formspec, since the internal group names are somewhat cryptic
to players. to players.
@ -266,7 +266,7 @@ the values are the group names which will be actually shown in the
Documentation System. Documentation System.
***Note***: This function is mostly there to work around a problem in ***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 groups to an interface is not pretty. Therefore, this function may be
deprecated when Minetest supports such a thing. deprecated when Minetest supports such a thing.

View File

@ -888,8 +888,9 @@ function doc.sub.items.add_item_image_overrides(image_overrides)
end end
-- Register group definition stuff -- Register group definition stuff
-- “Real” group names to replace the rather technical names -- More (user-)friendly group names to replace the rather technical names
function doc.sub.items.add_real_group_names(groupnames) -- for better understanding
function doc.sub.items.add_friendly_group_names(groupnames)
for internal, real in pairs(groupnames) do for internal, real in pairs(groupnames) do
groupdefs[internal] = real groupdefs[internal] = real
end end