Модуль:Meals Lookup: различия между версиями
Mhamster (обсуждение | вклад) Нет описания правки Метка: ручная отмена |
Нет описания правки |
||
| Строка 601: | Строка 601: | ||
end | end | ||
function p.tests3(frame) | |||
local out = {} | |||
for id in pairs(getrecipesfromtype(frame, "microwaveRecipes")) do | |||
for rtype, recipes in pairs(tabl) do | |||
for recipeId, recipe in pairs(recipes) do | |||
out[rtype] = {} | |||
if type(str) == "table" then do | |||
for _, patt in pairs(str) do | |||
if string.match(recipeId, patt) and not table.containsv(recipe) then | |||
table.insert(out[rtype], recipe) | |||
end | |||
end | |||
end else do | |||
if string.match(recipeId, str) then | |||
table.insert(out[rtype], recipe) | |||
end | |||
end | |||
end | |||
end | |||
end | |||
return out | |||
end | |||
end | |||
return p | return p | ||