432
edits
(Amend overrides for V1.2.2 additions) |
No edit summary Tag: Manual revert |
||
(9 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 204: | 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 279: | Line 285: | ||
["Winter"] = "png", | ["Winter"] = "png", | ||
["Nightfall"] = "png", | ["Nightfall"] = "png", | ||
["Solar Eclipse | ["Solar Eclipse"] = "png" | ||
} | } | ||
} | } | ||
Line 420: | 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 842: | Line 849: | ||
end | end | ||
function p._Currency(fileName, link, altText, | function p._Currency(fileName, link, altText, amount, maxAmount) | ||
local | local ret = {} | ||
table.insert(ret, '<span style="display:inline-block">') | |||
-- Currency icon | |||
if | if fileName ~= nil then | ||
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 | |||
if tonumber(amount) ~= nil then | |||
if | local function numColour(amount) | ||
if tonumber(amount) < 0 then | |||
if | return '<span style="color:red;">' .. formatnum(amount) .. '</span>' | ||
else | |||
return formatnum(amount) | |||
end | |||
end | |||
table.insert(ret, ' ' .. numColour(amount)) | |||
if (tonumber(maxAmount) ~= nil and maxAmount > amount) then | |||
table.insert(ret, ' - ' .. numColour(maxAmount)) | |||
end | end | ||
end | end | ||
table.insert(ret, '</span>') | |||
return table.concat(ret) | |||
end | end | ||
Line 882: | 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 | ||
edits