17,370
edits
(getCostString/_getShopTable: Support Golbin Raid shop items) |
(_getShopTable: Implement nolink for shop object icon overrides) |
||
Line 112: | Line 112: | ||
-- Translate certain media strings to icons, mostly for Golbin Raid shop objects | -- Translate certain media strings to icons, mostly for Golbin Raid shop objects | ||
local iconOverrides = { | local iconOverrides = { | ||
["assets/media/main/logo.svg"] = { icon = 'Melvor Logo', type = nil }, | ["assets/media/main/logo.svg"] = { icon = 'Melvor Logo', type = nil, noLink = true }, | ||
["assets/media/skills/prayer/prayer.svg"] = { icon = 'Prayer', type = 'skill' } | ["assets/media/skills/prayer/prayer.svg"] = { icon = 'Prayer', type = 'skill' } | ||
} | } | ||
local iconName, iconType = purchase.name, (purchType == 'Item Bundle' and 'item' or string.lower(purchType)) | local iconName, iconType, iconNoLink = purchase.name, (purchType == 'Item Bundle' and 'item' or string.lower(purchType)), nil | ||
if iconOverrides[purchase.media] ~= nil then | if iconOverrides[purchase.media] ~= nil then | ||
iconName, iconType = iconOverrides[purchase.media].icon, iconOverrides[purchase.media].type | iconName, iconType,iconNoLink = iconOverrides[purchase.media].icon, iconOverrides[purchase.media].type, iconOverrides[purchase.media].noLink | ||
end | end | ||
result = result..Icons.Icon({iconName, type=iconType, notext=true, size='50'}) | result = result..Icons.Icon({iconName, type=iconType, notext=true, nolink=iconNoLink, size='50'}) | ||
result = result..'||'..purchase.name..'||'..purchType | result = result..'||'..purchase.name..'||'..purchType | ||
result = result..'||'..purchase.description..'||style="text-align:right;"' | result = result..'||'..purchase.description..'||style="text-align:right;"' |