Модуль:Meals Lookup: различия между версиями

Нет описания правки
Нет описания правки
Строка 124: Строка 124:
     local out = {}
     local out = {}
     for type, recipes in pairs(tabl) do
     for type, recipes in pairs(tabl) do
         if not table.containsk(out, type) then
         out[type] = {}
            out[type] = {}
        end
         for recipeId, recipe in pairs(recipes) do
         for recipeId, recipe in pairs(recipes) do
             if not string.match(recipeId, str) then
             if string.match(recipeId, str) then break end
                if not table.containsv(out[type], recipe) then
            table.insert(out[type], recipe)
                    table.insert(out[type], recipe)
                end
            end
         end
         end
     end
     end