Anonymous

Module:Skills: Difference between revisions

From Melvor Idle
Adjusted the appearance of the Lesser Relics table
(Added Lesser Relics Table)
(Adjusted the appearance of the Lesser Relics table)
Line 560: Line 560:
for i, drops in pairs(skill.rareDrops) do
for i, drops in pairs(skill.rareDrops) do
if string.match(drops.itemID, '_Lesser_Relic') then
if string.match(drops.itemID, '_Lesser_Relic') then
local item = Items.getItemByID(drops.itemID)
table.insert(lesserRelics, Items.getItemByID(drops.itemID))
table.insert(lesserRelics, item)
end
end
end
end
Line 572: Line 571:
resultTable:addClass('wikitable sortable')
resultTable:addClass('wikitable sortable')
resultTable:tag('tr'):addClass('headerRow-0')
resultTable:tag('tr'):addClass('headerRow-0')
:tag('th'):wikitext('Icon')
:tag('th'):wikitext('Lesser Relic')
:tag('th'):wikitext('Lesser Relic')
:tag('th'):wikitext('Modifiers')
:tag('th'):wikitext('Modifiers')
Line 577: Line 577:
for _, relic in ipairs(lesserRelics) do
for _, relic in ipairs(lesserRelics) do
local tr = mw.html.create('tr')
local tr = mw.html.create('tr')
tr:tag('td'):wikitext(Icons.Icon({relic.name, type='item'}))
tr:tag('td'):wikitext(Icons.Icon({relic.name, type='item', size='50', notext=true}))
tr:tag('td'):wikitext(Icons.Icon({relic.name, type='item', noicon=true}))
tr:tag('td'):wikitext(Constants.getModifiersText(relic.modifiers))
tr:tag('td'):wikitext(Constants.getModifiersText(relic.modifiers))
resultTable:node(tr)
resultTable:node(tr)