Module:Obstacles/Recommended: Difference between revisions

m
forgor
m (images)
m (forgor)
Line 31: Line 31:
table.sort(tiers, function(a, b) return a.tier < b.tier end)
table.sort(tiers, function(a, b) return a.tier < b.tier end)
local function make_row(slot, data, compact)
local function make_row(tier, data, compact)
local tr = mw.html.create('tr')
local tr = mw.html.create('tr')
local tiericon = tr:tag('td')
local tiericon = tr:tag('td')
tiericon:wikitext( icons.Icon({slot.txt, img=slot.icon, type='skill'}) )
tiericon:wikitext( icons.Icon({tier.txt, img=tier.icon, type='skill'}) )
sloticon:wikitext(string.format('[[File:%s.svg|%s|link=%s|36px]]', slot.icon .. ' (Skill)', slot.txt, slot.link))
if compact then
if compact then
sloticon:attr('style', 'padding-bottom: 4px;')
tiericon:attr('style', 'padding-bottom: 4px;')
end
end
for _, v in ipairs(data) do
for _, v in ipairs(data) do
892

edits