4,951
edits
(Add overrides for new v1.1 potions) |
Falterfire (talk | contribs) (Moved getExpansionIcon here and directly keyed it off of ID) |
||
(One intermediate revision by the same user not shown) | |||
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 540: | Line 541: | ||
function p.RC(amt, maxamt) | function p.RC(amt, maxamt) | ||
return p._Currency('Raid_Coins.svg', 'Currency#Raid Coins', amt, maxamt) | return p._Currency('Raid_Coins.svg', 'Currency#Raid Coins', amt, maxamt) | ||
end | |||
--Adding a shortcut function for this | |||
function p.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 |