Модуль:Meals Lookup: различия между версиями
Mhamster (обсуждение | вклад) Нет описания правки |
Mhamster (обсуждение | вклад) Нет описания правки |
||
| Строка 167: | Строка 167: | ||
local recipe = p.chemicals[id] | local recipe = p.chemicals[id] | ||
local input = buildreagents(frame, getchemicalreagents(recipe)) | local input = buildreagents(frame, getchemicalreagents(recipe)) | ||
local output = | local output = recipe["effects"]["Entity"] | ||
local outamount = | local outamount = recipe["effects"]["Number"] | ||
out = frame:preprocess("{{Recipe Box" .. | out = frame:preprocess("{{Recipe Box" .. | ||
"| name = " .. | "| name = " .. | ||
| Строка 187: | Строка 187: | ||
--#endregion mixableRecipes | --#endregion mixableRecipes | ||
function xd(thing) | |||
return #thing | |||
end | |||
-- tests. | -- tests. | ||
function p.tests(frame) | function p.tests(frame) | ||
local out = "" | local out = "" | ||
out = out .. xd(p.chemicals[frame.args[6]:gsub(' ', '')]) | |||
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|buildslicerecipebox|".. frame.args[2] .. "}}") | out = out .. "\n" .. frame:preprocess("{{#invoke:Meals Lookup|buildslicerecipebox|".. frame.args[2] .. "}}") | ||