Module:Shop: Difference between revisions

re-pasted ZZZ version, as whatever was here seems a little buggy.
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 18: Line 18:
local out = mw.html.create('table'):addClass('article-table wikitable sortable ' .. (args.class or ''))
local out = mw.html.create('table'):addClass('article-table wikitable sortable ' .. (args.class or ''))
local delim = args.delim or ';;'
local delim = args.delim or ';;'
local currency = args.currency or 'Denny'
local currency = args.currency or 'Dough'
local stock = args.stock or 'Stock'
local stock = args.stock or 'Stock'
Line 78: Line 78:
local cost = data[2]
local cost = data[2]
local stock = data[3] or data.stock
local stock = data[3] or data.stock
local currency = data.currency or args.currency or 'Denny'
local currency = data.currency or args.currency or 'Dough'
function getCost(i)
function getCost(i)
Line 132: Line 132:
info.text = data.text or specific
info.text = data.text or specific
info['type'] = data['type']
info['type'] = data['type']
--if (data['type'] == 'W-Engine') then
 
--info.suffix = 'Icon'
--So we don't have dupe pages for Inspo Cards (etc.) and thousands of redirects.
--end
if (data['type'] == 'Inspo Card') then
info.text = ('Inspo Card: ' .. info.text)
end
if (data['type'] == 'Eye Color') then
info.text = ('Eye Color: ' .. info.text)
end
if (data['type'] == 'Eye Style') then
info.text = ('Eye Style: ' .. info.text)
end
if (data['type'] == 'Hair Color') then
info.text = ('Hair Color: ' .. info.text)
end
if (data['type'] == 'Hairstyle') then
info.text = ('Hairstyle: ' .. info.text)
end
row:tag('td'):node(Item(info))
row:tag('td'):node(Item(info))
if (not args.nocat) then category:wikitext('[[Category:Sells ', specific, '|', specific, ']]') end
if (not args.nocat) then category:wikitext('[[Category:Sells ', specific, '|', specific, ']]') end