Модуль:Meals Lookup: различия между версиями
Mhamster (обсуждение | вклад) Нет описания правки |
Mhamster (обсуждение | вклад) Нет описания правки |
||
| Строка 57: | Строка 57: | ||
local solids = p.buildsolids(frame, p.getmicrowaverecipesolids(frame, recipe)) | local solids = p.buildsolids(frame, p.getmicrowaverecipesolids(frame, recipe)) | ||
local reagents = p.buildreagents(frame, p.getmicrowaverecipereagents(frame, recipe)) | local reagents = p.buildreagents(frame, p.getmicrowaverecipereagents(frame, recipe)) | ||
out = frame:expandTemplate{ title = "Recipe Box", | out = frame:preprocess("{{Recipe Box".. | ||
name = e.getname(frame, recipe["result"]), | "|name={{#invoke:Entity Lookup|getname|".. recipe["result"] .."}}".. | ||
["component-1"] = solids .. reagents, | "|component-1="..solids .. "\n" .. reagents.. | ||
transformer = frame:expandTemplate{title="Recipe Transformers", "microwaveRecipes", recipe["time"]}, | "|transformer={{Recipe Transformers|microwaveRecipes|"..recipe["time"].."}}".. | ||
result = frame:expandTemplate{ title = "Recipe Component", item = e.getname(frame, recipe["result"])}} | "|result=".. frame:preprocess("{{Recipe Component|item={{#invoke:Entity Lookup|getname|".. recipe["result"] .."}}|image=Файл:Mousegif.gif}}" ) .. | ||
"}}") | |||
-- out = frame:expandTemplate{ title = "Recipe Box", | |||
-- name = e.getname(frame, recipe["result"]), | |||
-- ["component-1"] = solids .. reagents, | |||
-- transformer = frame:expandTemplate{title="Recipe Transformers", "microwaveRecipes", recipe["time"]}, | |||
-- result = frame:expandTemplate{ title = "Recipe Component", item = e.getname(frame, recipe["result"])}} | |||
return out | return out | ||
end | end | ||
| Строка 84: | Строка 90: | ||
out = out .. p.buildsolids(frame, p.getmicrowaverecipesolids(frame, p.getrecipe(frame, frame.args[2], frame.args[1]))) | out = out .. p.buildsolids(frame, p.getmicrowaverecipesolids(frame, p.getrecipe(frame, frame.args[2], frame.args[1]))) | ||
out = out .. "\n" .. p.buildreagents(frame, p.getmicrowaverecipereagents(frame, p.getrecipe(frame, frame.args[2], frame.args[1]))) | out = out .. "\n" .. p.buildreagents(frame, p.getmicrowaverecipereagents(frame, p.getrecipe(frame, frame.args[2], frame.args[1]))) | ||
out = out .. "\n" .. p.buildmicrowaverecipebox(frame, frame.args[1]) | |||
-- out = out .. p.buildmicrowaverecipebox(frame, frame.args[1]) | -- out = out .. p.buildmicrowaverecipebox(frame, frame.args[1]) | ||
return out | return out | ||