Module:Icons: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 1,135: Line 1,135:


-- Returns a skill icon based on the realm.
-- Returns a skill icon based on the realm.
function p._SkillRealmIcon(skill, realmID)
function p._SkillRealmIcon(skill, realmID, size)
local realm = realmID or 'melvorD:Melvor'
local realm = realmID or 'melvorD:Melvor'
local link = fixPagename(skill)
local link = fixPagename(skill)
Line 1,145: Line 1,145:
end
end
size = size or 25
img :wikitext('[[File:'):wikitext(link):wikitext('_(skill).'):wikitext(ext)
img :wikitext('[[File:'):wikitext(link):wikitext('_(skill).'):wikitext(ext)
:wikitext('|25x25px|link='):wikitext(link):wikitext(']]')
:wikitext('|'):wikitext(size):wikitext('x'):wikitext(size):wikitext('px')
:wikitext('|link='):wikitext(link):wikitext(']]')
return tostring(img)
return tostring(img)
2,875

edits