Module:Icons: Difference between revisions

no edit summary
(Add Underwater Ruins combat area extension override)
No edit summary
Tag: Manual revert
(10 intermediate revisions by 4 users not shown)
Line 45: Line 45:
["Hardcore Adventure Speedrun"] = "svg",
["Hardcore Adventure Speedrun"] = "svg",
["Mastery Tokens"] = "gif",
["Mastery Tokens"] = "gif",
["Lesser Relics"] = "gif",
["Prat, the Serpent of Fire"] = "svg",
["Prat, the Serpent of Fire"] = "svg",
["Unholy Prayers"] = "svg",
["Unholy Prayers"] = "svg",
Line 185: Line 186:
["Aranite Sieve"] = "png",
["Aranite Sieve"] = "png",
["Aranite Trowel"] = "png",
["Aranite Trowel"] = "png",
["Travel Token"] = "png",
["Dig Site Token"] = "png",
["Summoner's Pack I"] = "png",
["Summoners' Pack II"] = "png",
["Summoners' Pack III"] = "png",
-- Marks (Summoning), included to override the type level override above
-- Marks (Summoning), included to override the type level override above
["Eagle"] = "png",
["Eagle"] = "png",
Line 199: Line 205:
["Trickery Temple"] = "png",
["Trickery Temple"] = "png",
["Underwater City"] = "png",
["Underwater City"] = "png",
["Underwater Ruins"] = "png"
["Underwater Ruins"] = "png",
["Eye-conic Cave"] = "png",
["Mucky Cave"] = "png",
["Lost Temple"] = "png",
["Ritual Site"] = "png",
["Shipwreck Cove"] = "png",
}
}
}
}
Line 274: Line 285:
["Winter"] = "png",
["Winter"] = "png",
["Nightfall"] = "png",
["Nightfall"] = "png",
["Solar Eclipse"] = "png",
["Solar Eclipse"] = "png"
["Lemon Season"] = "png"
}
}
}
}
Line 324: Line 334:
["Cartographer's Enhancement"] = {'Cartography', 'skill'},
["Cartographer's Enhancement"] = {'Cartography', 'skill'},
["Cartographer's Knowledge"] = {'Cartography', 'skill'},
["Cartographer's Knowledge"] = {'Cartography', 'skill'},
["Combat Supply I"] = {'Adamant Javelin', 'item'},
["Combat Supply II"] = {'Rune Javelin', 'item'},
["Combat Supply III"] = {'Dragon Javelin', 'item'},
-- Golbin Raid shop items
-- Golbin Raid shop items
["Reduce Wave Skip Cost"] = {'Melvor Logo', ''},
["Reduce Wave Skip Cost"] = {'Melvor Logo', ''},
Line 412: Line 425:
-- Township generic statue building
-- Township generic statue building
['Statue of Worship'] = 'Statue of Nothing',
['Statue of Worship'] = 'Statue of Nothing',
-- Township seasons
["Lemon Season"] = 'Spring',
-- Easter egg stuff
-- Easter egg stuff
["Lemonade (Empty)"] = "Lemonade",
["Lemonade (Empty)"] = "Lemonade",
Line 834: Line 849:
end
end


function p._Currency(fileName, link, altText, amt, maxAmt)
function p._Currency(fileName, link, altText, amount, maxAmount)
local amtText = nil
local ret = {}
if tonumber(amt) ~= nil then
table.insert(ret, '<span style="display:inline-block">')
amtText = formatnum(amt)
-- Currency icon
if maxAmt ~= nil and maxAmt >= amt then
if fileName ~= nil then
amtText = amtText .. ' - ' .. formatnum(maxAmt)
table.insert(ret, '[[File:' .. fileName .. '|25px')
if link ~= nil then
table.insert(ret, '|link=' .. link)
end
end
table.insert(ret, '|alt=' .. ((altText == nil and '') or altText) .. ']]')
end
end
 
-- Currency amounts
local fileText = ''
if tonumber(amount) ~= nil then
if fileName ~= nil then
local function numColour(amount)
fileText = '[[File:' .. fileName .. '|25px'
if tonumber(amount) < 0 then
if link ~= nil then
return '<span style="color:red;">' .. formatnum(amount) .. '</span>'
fileText = fileText .. '|link=' .. link
else
return formatnum(amount)
end
end
table.insert(ret, '&nbsp;' .. numColour(amount))
if (tonumber(maxAmount) ~= nil and maxAmount > amount) then
table.insert(ret, ' - ' .. numColour(maxAmount))
end
end
fileText = fileText .. '|alt=' .. ((altText == nil and '') or altText) .. ']]'
end
end
 
table.insert(ret, '</span>')
return '<span style="display:inline-block">' .. fileText .. (amtText ~= nil and '&nbsp;' .. amtText or '') .. '</span>'
return table.concat(ret)
end
end


Line 874: Line 898:
function p.AoD()
function p.AoD()
return p.Icon({'Atlas of Discovery Expansion', notext=true, img='AoD', alt=''})
return p.Icon({'Atlas of Discovery Expansion', notext=true, img='AoD', alt=''})
end
-- Prework to have function call available for when DLC releases.
-- Remove comments and uncomment line below when the image is available.
function p.ItA()
--return p.Icon({'Into the Abyss Expansion', notext=true, img='ItA', alt=''})
return nil
end
end


432

edits