Anonymous

Module:Icons: Difference between revisions

From Melvor Idle
Amend nolink handling
(Add type link overrides & add Township resource overrides)
(Amend nolink handling)
(One intermediate revision by the same user not shown)
Line 329: Line 329:
['Leather'] = '',
['Leather'] = '',
['Clothing'] = ''
['Clothing'] = ''
},
['township'] = {
['Workers'] = ''
}
}
}
}
Line 458: Line 461:
local txtImg = (iconType ~= nil and iconType ~= '' and img .. '_(' .. iconType .. ')' or img) .. '.' .. ext
local txtImg = (iconType ~= nil and iconType ~= '' and img .. '_(' .. iconType .. ')' or img) .. '.' .. ext
-- Include a link unless no link -and- no text was requested
-- Include a link unless no link -and- no text was requested
local txtLink = '|link=' .. (nolink and notext and '' or link)
local txtLink = '|link=' .. (nolink and '' or link)
resultText = '[[File:' .. txtImg .. '|' .. txtSize .. 'x' .. txtSize .. 'px' .. txtLink .. ']]'
resultText = '[[File:' .. txtImg .. '|' .. txtSize .. 'x' .. txtSize .. 'px' .. txtLink .. ']]'
if class ~= nil and class ~= '' then
if class ~= nil and class ~= '' then