Show wear and description in crafting guide (#189)

This commit is contained in:
OgelGames
2021-11-22 05:42:54 +11:00
committed by GitHub
parent 8c84751ff8
commit 28a5d4db49
2 changed files with 9 additions and 3 deletions

View File

@ -157,7 +157,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
-- Check clicked item image button
local clicked_item
for name, value in pairs(fields) do
local new_dir, mangled_item = string.match(name, "^item_button_([a-z]+)_(.*)$")
local new_dir, mangled_item = string.match(name, "^[0-9]*_?item_button_([a-z]+)_(.*)$")
if new_dir and mangled_item then
clicked_item = unified_inventory.demangle_for_formspec(mangled_item)
if string.sub(clicked_item, 1, 6) == "group:" then