mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-22 19:03:43 +01:00
Clickable group items
This commit is contained in:
parent
c30db91662
commit
d903aaca89
4
init.lua
4
init.lua
@ -1077,7 +1077,7 @@ local function get_grid_fs(lang_code, fs, rcp, spacing)
|
||||
local btn_name = ""
|
||||
|
||||
if groups then
|
||||
btn_name = groups[1]
|
||||
btn_name = fmt("group|%s|%s", groups[1], item)
|
||||
elseif item ~= "" then
|
||||
btn_name = item
|
||||
end
|
||||
@ -1690,6 +1690,8 @@ local function fields(player, _f)
|
||||
item = sub(item, 1, -5)
|
||||
elseif sub(item, 1, 1) == "_" then
|
||||
item = sub(item, 2)
|
||||
elseif sub(item, 1, 6) == "group|" then
|
||||
item = match(item, "([%w:_]+)$")
|
||||
end
|
||||
|
||||
item = reg_aliases[item] or item
|
||||
|
Loading…
Reference in New Issue
Block a user