Module:Infobox Recipe: Difference between revisions

no edit summary
(Copy of Recipe Infobox from Sandbox/User:The_Gaffer/Modules/Infobox Recipe to replace existing Infobox Recipe Implementation)
 
No edit summary
Line 23:
--get the value for the output product
local output1Value = args.output1 and mw.smw.ask('[[:+]][[' .. args.output1 .. ']]|?Value|limit=1')
local output1TotalValue = output1Value[1]['Value'] * (tonumber(args.output1qty) or 1)
if output1Value ~= nil then
output1TotalValue = output1Value[1]['Value'] * (tonumber(args.output1qty) or 1)
else
output1TotalValue = 0
end
--Check if any of the raw mats provided are intermediate products, if they are, return their own raw materials
956

edits