Module:Sandbox/User:The Gaffer/Modules/Products table

From Brighter Shores Wiki
Revision as of 21:36, 16 November 2024 by The Gaffer (talk | contribs) (Created page with "local p = {} function p._main(frame) local args = frame:getParent().args local mw = require('mw') local rawmat1cost = args.rawmat1 and getCost(mw.smw.ask('+ ?Uses item | limit=50 | order=asc | headers=show | mainlabel=Recipe')) or 0 mw.logObject(rawmat1cost) end")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Sandbox/User:The Gaffer/Modules/Products table/doc

local p = {}

function p._main(frame)
    local args = frame:getParent().args
    local mw = require('mw')
    
    
    local rawmat1cost = args.rawmat1 and getCost(mw.smw.ask('[[:+]][[Uses item::' .. args.mat .. '| ?Uses item | limit=50 | order=asc | headers=show | mainlabel=Recipe]]')) or 0
    mw.logObject(rawmat1cost)
end