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

блять
Метка: отмена
намана
Строка 64: Строка 64:
     for item, amount in pairs(array) do
     for item, amount in pairs(array) do
         out = out .. frame:preprocess("{{Chem Recipe Component|reagent=" .. item .. "|amount=" .. amount .. "}}")
         out = out .. frame:preprocess("{{Chem Recipe Component|reagent=" .. item .. "|amount=" .. amount .. "}}")
    end
    return out
end
function getrecipesbyname(frame, str) -- should not be inviked
    local out = {}
    for type, recipes in pairs(p.meals) do
        for recipeId, recipe in pairs(recipes) do
            if string.match(recipeId, str) then
                table.insert(out, recipe)
            end
        end
     end
     end
     return out
     return out
Строка 311: Строка 323:


--#endregion mixableRecipes
--#endregion mixableRecipes
--#region dishes
function p.soups(frame)
    local out = ""
    return out
end
--#endregion




Строка 316: Строка 335:
function p.tests(frame)
function p.tests(frame)
     local out = ""
     local out = ""
    for r in getrecipesbyname(frame, "[Ss]oup") do
        out = out .. " " .. r["id"]
    end
     return out
     return out
end
end


return p
return p