Module:Calculator/AgilityObstacle: Difference between revisions

Add icon overrides for Abyssal currencies
(Update for v1.3)
(Add icon overrides for Abyssal currencies)
Line 9: Line 9:
local Icons = require('Module:Icons')
local Icons = require('Module:Icons')


local iconTable = {
['GP']  = Icons.GP(amount),
['SC']  = Icons.SC(amount),
['AP']  = Icons.AP(amount),
['ASC'] = Icons.ASC(amount),
}
local function getItemIcon(itemName, amount)
local function getItemIcon(itemName, amount)
if itemName == 'GP' then
return iconTable[itemName] or Icons.Icon({itemName, type='item', qty = amount, notext=true})
return Icons.GP(amount)
end
if itemName == 'SC' then
return Icons.SC(amount)
end
return Icons.Icon({itemName, type='item', qty = amount, notext=true})
end
end


2,875

edits