Module:Products: Difference between revisions

11 bytes removed ,  30 November 2024
Rename "item" parameter to "1", since many pages are using it like that anyways
(increase smw limit)
(Rename "item" parameter to "1", since many pages are using it like that anyways)
Line 11:
function p._main(args)
args = args or {}
args.local item = args.item[1] or mw.title.getCurrentTitle().text
local showPrices = yesno(args.showPrices)
local showValues = yesno(args.showValues)
Line 17:
-- Query for data
local smw_data = mw.smw.ask{
'[[Uses item::' .. args.item .. ']]',
'?Uses item',
'?Recipe JSON',
Line 24:
}
if not smw_data then
return ('There are no known products for item [[%s]]'):format(args.item)
end
 
1,482

edits