Module:Icons: Difference between revisions

From Melvor Idle
m (Remove local indexing of unused function)
m (Icon: Fix issue when overrides amend displayed link text)
Line 414: Line 414:
if not hasText and ovrTxt ~= nil then
if not hasText and ovrTxt ~= nil then
text = ovrTxt
text = ovrTxt
hasText = true
end
end
if ovrLink ~= nil then
if ovrLink ~= nil then
if not hasText then text = link end
if not hasText then
text = link
hasText = true
end
link = ovrLink
link = ovrLink
end
end
Line 431: Line 435:
-- There are a couple specific double overrides to be included that don't fit in the above lists
-- There are a couple specific double overrides to be included that don't fit in the above lists
if ambiguousOverrides[link] then
if ambiguousOverrides[link] then
if not hasText then text = link end
if not hasText then
text = link
hasText = true
end
link = link..' ('..(iconType == 'mark' and 'item' or iconType)..')'
link = link..' ('..(iconType == 'mark' and 'item' or iconType)..')'
end
end