17,101
edits
Falterfire (talk | contribs) (Moved getExpansionIcon here and directly keyed it off of ID) |
(Add type link overrides & add Township resource overrides) |
||
Line 313: | Line 313: | ||
['Spider2'] = 'Brown Spider' | ['Spider2'] = 'Brown Spider' | ||
} | } | ||
--When calling for an icon for Key + Type, the link goes to Value | |||
local typeLinkOverrides = { | |||
['resource'] = { | |||
-- Township resources | |||
['Food'] = '', | |||
['Wood'] = '', | |||
['Planks'] = '', | |||
['Stone'] = '', | |||
['Bar'] = '', | |||
['Ore'] = '', | |||
['Coal'] = '', | |||
['Rune Essence'] = '', | |||
['Herbs'] = '', | |||
['Potions'] = '', | |||
['Leather'] = '', | |||
['Clothing'] = '' | |||
} | |||
} | |||
--If no other text override was specified for the given link, use these | --If no other text override was specified for the given link, use these | ||
local txtOverrides = { | local txtOverrides = { | ||
Line 372: | Line 391: | ||
local ovrTxt = txtOverrides[link] | local ovrTxt = txtOverrides[link] | ||
local ovrLink = linkOverrides[link] | local ovrLink = linkOverrides[link] | ||
local ovrTypeLink = typeLinkOverrides[iconType] | |||
if ovrTypeLink ~= nil and ovrTypeLink[img] ~= nil then | |||
if ovrTypeLink[img] == '' then | |||
nolink = true | |||
else | |||
ovrLink = ovrTypeLink[img] | |||
end | |||
end | |||
local hasText = (text ~= nil and text ~= '') | local hasText = (text ~= nil and text ~= '') | ||
if ovrImg ~= nil and img == link then | if ovrImg ~= nil and img == link then |