mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-26 04:23:44 +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 = ""
|
local btn_name = ""
|
||||||
|
|
||||||
if groups then
|
if groups then
|
||||||
btn_name = groups[1]
|
btn_name = fmt("group|%s|%s", groups[1], item)
|
||||||
elseif item ~= "" then
|
elseif item ~= "" then
|
||||||
btn_name = item
|
btn_name = item
|
||||||
end
|
end
|
||||||
@ -1690,6 +1690,8 @@ local function fields(player, _f)
|
|||||||
item = sub(item, 1, -5)
|
item = sub(item, 1, -5)
|
||||||
elseif sub(item, 1, 1) == "_" then
|
elseif sub(item, 1, 1) == "_" then
|
||||||
item = sub(item, 2)
|
item = sub(item, 2)
|
||||||
|
elseif sub(item, 1, 6) == "group|" then
|
||||||
|
item = match(item, "([%w:_]+)$")
|
||||||
end
|
end
|
||||||
|
|
||||||
item = reg_aliases[item] or item
|
item = reg_aliases[item] or item
|
||||||
|
Loading…
Reference in New Issue
Block a user