Correctly display multi-group ingredients

Extend the representative-item logic to handle ingredients specified
as the intersection of multiple groups.  Also add mangling of item
button content, because comma for a multi-group ingredient is getting
formspec-escaped and then not de-escaped.
This commit is contained in:
Zefram
2014-06-13 10:40:52 +01:00
committed by Diego Martinez
parent dbf98cb694
commit a8c8ef0890
4 changed files with 41 additions and 10 deletions

View File

@ -165,7 +165,7 @@ local function stack_image_button(x, y, w, h, buttonname_prefix, item)
return string.format("item_image_button[%u,%u;%u,%u;%s;%s;%s]",
x, y, w, h,
minetest.formspec_escape(displayitem),
minetest.formspec_escape(buttonname_prefix..selectitem),
minetest.formspec_escape(buttonname_prefix..unified_inventory.mangle_for_formspec(selectitem)),
label)
end