2,875
edits
(Fix styling issues with lists) |
(Add support for SC name and SC icon as item) |
||
Line 19: | Line 19: | ||
aod = icons.AoD(), | aod = icons.AoD(), | ||
ita = icons.ItA() | ita = icons.ItA() | ||
} | |||
local SpecialItems = { | |||
['GP'] = 'Gold Pieces', | |||
['SC'] = 'Slayer Coins', | |||
} | |||
local SpecialIcons = { | |||
['Gold Pieces'] = icons.GP(), | |||
['Slayer Coins'] = icons.SC(), | |||
} | } | ||
Line 33: | Line 43: | ||
local function formatItemName(name) | local function formatItemName(name) | ||
-- Special case to correctly format GP name. | -- Special case to correctly format GP name. | ||
if | if SpecialItems[name] then | ||
return SpecialItems[name] | |||
end | |||
-- Got to solve too many edge case swith this (like of and IV) | -- Got to solve too many edge case swith this (like of and IV) | ||
-- Better just make the user use the correct name instead. | -- Better just make the user use the correct name instead. | ||
Line 62: | Line 72: | ||
local function getItemIcon(iconName) | local function getItemIcon(iconName) | ||
if iconName | if SpecialIcons[iconName] then | ||
return | return SpecialIcons[iconName] | ||
end | end | ||
return icons.Icon({iconName, type='item', notext=true}) | return icons.Icon({iconName, type='item', notext=true}) | ||
end | end |
edits