Anonymous

Module:Icons: Difference between revisions

From Melvor Idle
11 bytes removed ,  13 November 2022
Amend nolink handling
(Additional link override for Township workers)
(Amend nolink handling)
Line 461: 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