Module:Availability

local p = {}

function p.main(frame) local args = frame:getParent.args local name = args[1] or "Splatfest" local size = args[2] or "24px" local game = args['game'] or "Splatoon" local iconOnly = args['icononly'] or false return p.getAvailability(name, size, game, iconOnly) end

function p.getAvailability(name, size, game, iconOnly) local filename, link, displayText if name == "7-Eleven" then filename = "7-Eleven Logo.png" link = "Gear#Promotional gear" displayText = "7-Eleven" elseif name == "CoroCoro Comic" then filename = "CoroCoro Comic Logo.png" link = "Gear#CoroCoro Comic Promotional Gear" displayText = "CoroCoro Comic" elseif name == "Octo Canyon" then filename = "S2 Icon Octo Canyon.png" link = "Octo Canyon (mode)" displayText = "Octo Canyon" elseif name == "Octo Valley" then filename = "S Icon Octo Valley.png" link = "Octo Valley (mode)" displayText = "Octo Valley" elseif name == "Salmon Run" then filename = "S2 Icon Grizzco.png" link = "Salmon Run" displayText = "Salmon Run" elseif name == "Salmon Run Next Wave" then filename = "S3 Icon Mr Grizz.png" link = "Salmon Run Next Wave" displayText = "Salmon Run Next Wave" elseif name == "Octo Expansion" then filename = "S2 Icon C.Q. Cumber.png" link = "Octo Expansion" displayText = "Octo Expansion" elseif name == "Return of the Mammalians" then filename = "S3 Icon Return of the Mammalians.png" link = "Return of the Mammalians" displayText = "Return of the Mammalians" elseif name == "Splatfest" then link = "Splatfest" displayText = "Splatfest" if game == "Splatoon 2" then filename = "S2 Splatfest Logo.svg" elseif game == "Splatoon 3" then filename = "S3 Splatfest Logo.svg" else -- including Splatoon 1 filename = "Splatfest Logo.png" end else -- Default case filename = "S Ability Locked.png" displayText = name link = name end -- Generate the link and icon local imgTag = '' if iconOnly == "true" then return imgTag else return imgTag .. '&#32;' .. displayText .. '' end end

return p