Module:Variants: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Print unknown icon for professions with only a level) |
(Only show the variant name and do not repeat the variant category name) |
||
Line 19: | Line 19: | ||
'?Profession Level A High', |
'?Profession Level A High', |
||
'?Profession Level B High', |
'?Profession Level B High', |
||
'?Variant name', |
|||
get_images and '?Image#64px;x64px = Image' or nil, |
get_images and '?Image#64px;x64px = Image' or nil, |
||
limit = args.limit or 500, |
limit = args.limit or 500, |
||
Line 36: | Line 37: | ||
local formatted = {} |
local formatted = {} |
||
for _, entry in ipairs(smw_data) do |
for _, entry in ipairs(smw_data) do |
||
local page = entry[1] |
|||
local pipe = page:find('|') |
|||
if pipe then |
|||
page = page:sub(3, pipe-1) |
|||
else |
|||
page = page:sub(3, -3) |
|||
end |
|||
table.insert(formatted, ('[[%s|%s]]'):format(page, entry['Variant name'])) |
|||
end |
end |
||
contents = table.concat(formatted, ' • ') |
contents = table.concat(formatted, ' • ') |