Модуль:Meals Lookup: различия между версиями
Mhamster (обсуждение | вклад) Нет описания правки |
Mhamster (обсуждение | вклад) Нет описания правки |
||
| Строка 82: | Строка 82: | ||
--#region sliceableRecipes | --#region sliceableRecipes | ||
function p. | function p.buildslicerecipebox(frame) -- {{#invoke:Meals Lookup|buildslicerecipebox|SliceableRecipeID}} | ||
local out = "" | local out = "" | ||
local id = frame.args[1]:gsub(' ', '') | local id = frame.args[1]:gsub(' ', '') | ||
| Строка 99: | Строка 99: | ||
--#region grindableRecipes | --#region grindableRecipes | ||
function p. | function p.buildgrindrecipebox(frame) -- {{#invoke:Meals Lookup|buildslicerecipebox|SliceableRecipeID}} | ||
local out = "" | local out = "" | ||
local id = frame.args[1]:gsub(' ', '') | local id = frame.args[1]:gsub(' ', '') | ||
local recipe = getrecipe(" | local recipe = getrecipe("grindableRecipes", id) | ||
local result = buildreagents(frame, recipe["result"]) | local result = buildreagents(frame, recipe["result"]) | ||
out = frame:preprocess("{{Recipe Box".. | out = frame:preprocess("{{Recipe Box".. | ||
| Строка 119: | Строка 119: | ||
local out = "" | local out = "" | ||
out = out .. "\n" .. frame:preprocess("{{#invoke:Meals Lookup|buildmicrowaverecipebox|".. frame.args[1] .. "}}") | out = out .. "\n" .. frame:preprocess("{{#invoke:Meals Lookup|buildmicrowaverecipebox|".. frame.args[1] .. "}}") | ||
out = out .. "\n" .. frame:preprocess("{{#invoke:Meals Lookup| | out = out .. "\n" .. frame:preprocess("{{#invoke:Meals Lookup|buildslicerecipebox|".. frame.args[2] .. "}}") | ||
out = out .. "\n" .. frame:preprocess("{{#invoke:Meals Lookup|buildgrindrecipebox|".. frame.args[3] .. "}}") | |||
return out | return out | ||
end | end | ||
return p | return p | ||