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

Нет описания правки
Нет описания правки
Строка 112: Строка 112:
         out[type] = {}
         out[type] = {}
         for recipeId, recipe in pairs(recipes) do
         for recipeId, recipe in pairs(recipes) do
             if string.match(recipeId, str) then
             if string.find(recipeId, str) ~= nil then
                 table.insert(out[type], recipe)
                 table.insert(out[type], recipe)
             end
             end
Строка 126: Строка 126:
         out[type] = {}
         out[type] = {}
         for recipeId, recipe in pairs(recipes) do
         for recipeId, recipe in pairs(recipes) do
             if string.match(recipeId, str) then break end
             if string.find(recipeId, str) ~= nil then break end
             table.insert(out[type], recipe)
             table.insert(out[type], recipe)
         end
         end