4,951
edits
Falterfire (talk | contribs) (Added override for Perilous Peaks/Miolite Caves to use PNG) |
Falterfire (talk | contribs) (Adding overrides for resupplies.) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 15: | Line 15: | ||
["Lemons"] = "jpg", | ["Lemons"] = "jpg", | ||
["Lemonade"] = "jpg", | ["Lemonade"] = "jpg", | ||
["Miolite | ["Miolite Sprig"] = "png", | ||
[" | ["Miolite Trio"] = "png", | ||
["Miolite Warden"] = "png", | |||
["Miolite Monarch"] = "png", | |||
["Wicked Greater Dragon"] = "png", | |||
["Hunting Greater Dragon"] = "png", | |||
["Chaotic Greater Dragon"] = "png", | |||
["Beavis"] = "png", | |||
["Pudding Duckie"] = "png", | |||
["Pyro"] = "png", | |||
["Snek"] = "png", | |||
["Larry, the Lonely Lizard"] = "png", | |||
["Caaarrrlll"] = "png", | |||
["Gronk"] = "png", | |||
["Finn, the Cat"] = "png", | |||
["Marahute"] = "png", | |||
["Monk-ey"] = "png", | |||
["Asura"] = "png" | |||
} | } | ||
Line 31: | Line 47: | ||
['Melee'] = 'Combat', | ['Melee'] = 'Combat', | ||
['Spider (lv. 51)'] = 'Spider', | ['Spider (lv. 51)'] = 'Spider', | ||
['Spider (lv. 52)'] = 'Spider2' | ['Spider (lv. 52)'] = 'Spider2', | ||
['Basic Resupply'] = 'Lobster', | |||
['Standard Resupply'] = 'Crab', | |||
['Generous Resupply'] = 'Shark' | |||
} | } | ||
--When calling for an icon for Key, the link goes to Value | --When calling for an icon for Key, the link goes to Value | ||
Line 45: | Line 64: | ||
['Spider2'] = 'Spider (lv. 52)' | ['Spider2'] = 'Spider (lv. 52)' | ||
} | } | ||
--Ambiguous overrides section | |||
local ambiguousOverrides = {'Golbin', 'Chick'} | |||
local Shared= require("Module:Shared") | local Shared= require("Module:Shared") | ||
Line 88: | Line 109: | ||
end | end | ||
--There are a couple specific double overrides I want to include that don't fit in the above lists | --There are a couple specific double overrides I want to include that don't fit in the above lists | ||
if link | if Shared.contains(ambiguousOverrides, link) then | ||
if text == nil then text = | if text == nil then text = link end | ||
link = ' | link = link..' ('..type..')' | ||
end | end | ||
Line 174: | Line 195: | ||
local showText = args.showText ~= nil and args.showText ~= '' and args.showText ~= 'false' | local showText = args.showText ~= nil and args.showText ~= '' and args.showText ~= 'false' | ||
return p._MasteryReq(itemName, level, showText) | return p._MasteryReq(itemName, level, showText) | ||
end | |||
function p._Currency(fileName, link, amt, maxAmt) | |||
local amtText = Shared.formatnum(amt) | |||
if maxAmt ~= nil and maxAmt >= amt then | |||
amtText = amtText .. ' - ' .. Shared.formatnum(maxAmt) | |||
end | |||
local fileText = '' | |||
if fileName ~= nil then | |||
fileText = '[[File:' .. fileName .. '|25px' | |||
if link ~= nil then | |||
fileText = fileText .. '|link=' .. link | |||
end | |||
fileText = fileText .. ']] ' | |||
end | |||
return '<span style="display:inline-block">' .. fileText .. amtText .. '</span>' | |||
end | end | ||
function p.GP(amt, maxamt) | function p.GP(amt, maxamt) | ||
return p._Currency('Coins.svg', 'Coins', amt, maxamt) | |||
end | end | ||
function p.SC(amt, maxamt) | function p.SC(amt, maxamt) | ||
return p._Currency('Slayer Coins.svg', 'Currency#Slayer Coins', amt, maxamt) | |||
end | |||
function p.RC(amt, maxamt) | |||
return p._Currency('Raid_Coins.svg', 'Currency#Raid Coins', amt, maxamt) | |||
end | end | ||
return p | return p |