Module:Icons: Difference between revisions

Moved getExpansionIcon here and directly keyed it off of ID
(Added TotH function)
(Moved getExpansionIcon here and directly keyed it off of ID)
Line 3: Line 3:


local Shared = require("Module:Shared")
local Shared = require("Module:Shared")
local GameData = require("Module:GameData")


-- Locally index some functions for performance
-- Locally index some functions for performance
Line 545: Line 546:
function p.TotH()
function p.TotH()
return p.Icon({'Throne of the Herald Expansion', ext='svg', notext=true, img='TotH'})
return p.Icon({'Throne of the Herald Expansion', ext='svg', notext=true, img='TotH'})
end
function p.getExpansionIcon(id)
local ns, _ = GameData.getLocalID(id)
if ns == 'melvorTotH' then
return p.TotH()..' '
else
return ''
end
end
end


return p
return p