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

Нет описания правки
Нет описания правки
Строка 101: Строка 101:
end
end


function getotherrecipes(frame, str)
function getotherrecipes(frame, tabl, str)
     local out = {}
     local out = {}
     for type, recipes in pairs(p.meals) do
     for type, recipes in pairs(tabl) do
         if not table.containsk(out, type) then
         if not table.containsk(out, type) then
             out[type]= {}
             out[type]= {}
Строка 374: Строка 374:
function p.tests(frame)
function p.tests(frame)
     local out = ""
     local out = ""
    local tablo = {}
     for _, patt in pairs(frame.args) do
     for _, patt in pairs(frame.args) do
         for type, recipes in pairs(getotherrecipes(frame, patt)) do
         for type, recipes in pairs(getotherrecipes(frame, p.meals, patt)) do
             out = out .. type .. "("
             out = out .. type .. "("
             for k, r in pairs(recipes) do
             for k, r in pairs(recipes) do