search: use : and _ as equal in search. remove debug prints.

This commit is contained in:
Alexander Weber 2017-05-15 20:42:45 +02:00
parent cd85e62eb2
commit 3cbaf291b8
2 changed files with 1 additions and 3 deletions

View File

@ -172,7 +172,6 @@ function crecipe_class:get_with_placeholder(player, inventory_tab)
-- set recipe item
if item then
print(dump(recipe.items), key, item)
if recipe_item ~= item then
recipe.items[key] = {
item = item,
@ -182,7 +181,6 @@ function crecipe_class:get_with_placeholder(player, inventory_tab)
end
end
end
print(dump(recipe))
return recipe
end

View File

@ -110,7 +110,7 @@ function ui_tools.filter_by_searchstring(list, search_string)
table.insert(filtered_list, entry)
else
for _, cgroup in pairs(entry.citem.cgroups) do
if cgroup.keyword and string.find(cgroup.keyword:lower(), search_string) then
if cgroup.keyword and string.find(cgroup.keyword:lower():gsub("_", ":"), search_string:gsub("_", ":")) then
table.insert(filtered_list, entry)
break
end