diff options
author | Zefram <zefram@fysh.org> | 2014-06-13 10:40:52 +0100 |
---|---|---|
committer | Diego Martinez <kaeza@users.sf.net> | 2014-06-13 09:28:37 -0300 |
commit | a8c8ef08901f9d1bbe81045bd12a47fe3a82e5ea (patch) | |
tree | ef87b68353f1f81e5314008a9899cc8828a3454f /callbacks.lua | |
parent | dbf98cb694578223c0f3bb1016e054ce636f2276 (diff) |
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.
Diffstat (limited to 'callbacks.lua')
-rw-r--r-- | callbacks.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/callbacks.lua b/callbacks.lua index f1646ed..ad7c1ed 100644 --- a/callbacks.lua +++ b/callbacks.lua @@ -122,7 +122,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) local clicked_item = nil for name, value in pairs(fields) do if string.sub(name, 1, 12) == "item_button_" then - clicked_item = string.sub(name, 13) + clicked_item = unified_inventory.demangle_for_formspec(string.sub(name, 13)) if string.sub(clicked_item, 1, 6) == "group:" then minetest.sound_play("click", {to_player=player_name, gain = 0.1}) unified_inventory.apply_filter(player, clicked_item) |