Module:Infobox Recipe: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(Tidy)
No edit summary
Line 31: Line 31:
--Calculate total value of output material(s)
--Calculate total value of output material(s)
local output1TotalValue = 0
local output1TotalValue = 0
if output1Value[1]['Value'] ~= nil then
if type(output1Value) == "table" then
output1TotalValue = output1Value[1]['Value'] * (tonumber(args.output1qty) or 1)
if output1Value[1]['Value'] ~= nil then
output1TotalValue = output1Value[1]['Value'] * (tonumber(args.output1qty) or 1)
else
else
output1TotalValue = 0
output1TotalValue = 0
end
end
end