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

Нет описания правки
Нет описания правки
Строка 82: Строка 82:
--#region sliceableRecipes
--#region sliceableRecipes


function p.buildmslicerecipebox(frame) -- {{#invoke:Meals Lookup|buildmslicerecipebox|SliceableRecipeID}}
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.buildmgrindrecipebox(frame) -- {{#invoke:Meals Lookup|buildmslicerecipebox|SliceableRecipeID}}
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("sliceableRecipes", id)
     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|buildmslicerecipebox|".. frame.args[2] .. "}}")
     out = out .. "\n" .. frame:preprocess("{{#invoke:Meals Lookup|buildslicerecipebox|".. frame.args[2] .. "}}")
     -- out = out .. p.buildmicrowaverecipebox(frame, frame.args[1])
     out = out .. "\n" .. frame:preprocess("{{#invoke:Meals Lookup|buildgrindrecipebox|".. frame.args[3] .. "}}")
     return out
     return out
end
end


return p
return p