Module:Sandbox/User:The Gaffer/Modules/Infobox Recipe: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
The Gaffer (talk | contribs) No edit summary |
The Gaffer (talk | contribs) No edit summary |
||
Line 9: | Line 9: | ||
-- Define raw material costs based on Semantic MediaWiki queries |
-- Define raw material costs based on Semantic MediaWiki queries |
||
local function getCost(queryResult) |
local function getCost(queryResult) |
||
if type(queryResult) == "table" and queryResult[1] then |
if type(queryResult) == "table" and queryResult[1]['Shop buy price'] then |
||
return tonumber(queryResult[1]) or 0 |
return tonumber(queryResult[1]['Shop buy price']) or 0 |
||
end |
end |
||
return 0 |
return 0 |