2,877
edits
(Update for v1.3) |
(Use mw.html instead) |
||
Line 277: | Line 277: | ||
end | end | ||
local | local html = mw.html.create('table') | ||
:addClass('wikitable sortable stickyHeader') | |||
html:tag('tr') | |||
:tag('th'):attr('colspan', 4) | |||
:wikitext([['..potionName..']]) | |||
:tag('tr') | |||
:tag('th'):wikitext('Potion') | |||
:tag('th'):wikitext('Tier') | |||
:tag('th'):wikitext('Charges') | |||
:tag('th'):wikitext('Effect') | |||
for i, potionID in ipairs(recipe.potionIDs) do | for i, potionID in ipairs(recipe.potionIDs) do | ||
Line 286: | Line 293: | ||
local potion = Items.getItemByID(potionID) | local potion = Items.getItemByID(potionID) | ||
if potion ~= nil then | if potion ~= nil then | ||
html:tag('tr') | |||
:tag('td'):wikitext(Icons.Icon({potion.name, type='item', notext=true, size='25'})) | |||
:tag('td'):wikitext(Icons.getExpansionIcon(potion.id)) | |||
:wikitext(Icons.Icon({potion.name, tier, type='item', noicon=true})) | |||
:tag('td'):wikitext(potion.charges) | |||
:tag('td'):wikitext(p._getPotionDescription(potion)) | |||
end | end | ||
end | end | ||
return tostring(html) | |||
return | |||
end | end | ||
edits