Anonymous

Module:Icons: Difference between revisions

From Melvor Idle
no edit summary
No edit summary
No edit summary
Line 866: Line 866:
-- Currency amounts
-- Currency amounts
if tonumber(amount) ~= nil then
if tonumber(amount) ~= nil then
html:node(numColour(amount))
local text = mw.html.create('span')
:css('margin-right', '0.2em')
:node(numColour(amount))
if (tonumber(maxAmount) ~= nil and maxAmount > amount) then
if (tonumber(maxAmount) ~= nil and maxAmount > amount) then
html:wikitext(' - ' .. numColour(maxAmount))
text:wikitext(' - ' .. numColour(maxAmount))
end
end
html:node(text:done())
end
end
-- Currency icon
-- Currency icon
if fileName ~= nil then
if fileName ~= nil then
html:wikitext(' '):wikitext('[[File:'):wikitext(fileName):wikitext('|25px')
html:wikitext('[[File:'):wikitext(fileName):wikitext('|25px')
if link ~= nil then
if link ~= nil then
html:wikitext('|link='):wikitext(link)
html:wikitext('|link='):wikitext(link)
2,875

edits