Module:Dia code

From The Wiki Camp 2 Jr.
Jump to navigation Jump to search

Documentation for this module may be created at Module:Dia code/doc

--[[

This module is intended to provide an alt text (text that appears when the image
doesn't load or is copied to a plaintext editor) for the image on {{Dia}}, and
to provide an appropriate link to the character when the image is clicked. It is
a replacement for Template:Dia/code.
]]

local p = {}

--[[

This table provides the alt text and link destination for each code used in the
Dia template. For codes not listed in the table, the alt text and link
destination is equal to the code itself.

Each line has the following form:
    {"code", "alt text", "link destination"},
OR
    {"code", "alt text and link destination"},

In the alt text, put the name of the character for the code or describe it. In
the link destination, provide the name of the article/page which describes the
character for the code. If the alt text and link destination is equal, use the
latter form, which only has two entries.

To not link to any article at all (for example, an article for the character
doesn't exist, or the character is actually two characters whose relationship
page doesn't exist), leave the link destination blank, like this:
    {"code", "alt text", ""}
]]

local codes = {
	-- putting all these at the top in case some of them were already added with something different.
	{"AdmiralBootes", "Admiral-Boötes"},
	{"AlabasterChesterdrawers", "Alabaster Chesterdrawers"},
	{"AlexanderTheGreat", "Alexander the Great"},
	{"AnimalCrossingJoeBiden", "Animal Crossing Joe Biden"},
	{"AnonTecho", "Anon Techo"},
	{"AutreyFulse", "Autrey Fulse"},
	{"BabySpike", "Baby Spike", "Spike"},
	{"BaldiLivid", "Baldi"},
	{"Baseless.gif", "Baseless accusations"},
	{"Beato1", "Beatrice"},
	{"Beato10", "Beatrice"},
	{"Beato11", "Beatrice"},
	{"Beato12", "Beatrice"},
	{"Beato13", "Beatrice"},
	{"Beato14", "Beatrice"},
	{"Beato2", "Beatrice"},
	{"Beato3", "Beatrice"},
	{"Beato4", "Beatrice"},
	{"Beato5", "Beatrice"},
	{"Beato6", "Beatrice"},
	{"Beato7", "Beatrice"},
	{"Beato8", "Beatrice"},
	{"Beato9", "Beatrice"},
	{"Bert", "Bert", "Bert and Ernie"},
	{"BetterThanYouHost", ""}, -- idk
	{"BigBoy", "Big Boy"},
	{"BigBoyDriver", "Big Boy's driver", "Big Boy"},
	{"Bloombaby", "Baby Bloomberg"},
	{"Bloomberg", "Michael Bloomberg"},
	{"Bloomberg2", "Michael Bloomberg"},
	{"BloombergAwesome", "Michael Bloomberg"},
	{"BloombergDeath", "Michael Bloomberg"},
	{"BloombergWin", "Michael Bloomberg"},
	{"Bloomsad", "Michael Bloomberg"},
	{"CHUBSWORLD ", "CHUBSWORLD_"},
	{"Camp2gcn", "Main Page"},
	{"CaptainThreelegs", "Captain Threelegs"},
	{"Carly", "Carly", "User:Therobot47"},
	{"Chubs", "Chubs", "User:Chubs"},
	{"CiaotchiSad", "Ciaotchi"},
	{"CoinyDEL", "Coiny"},
	{"CopperPepper", "Copper Pepper"},
	{"CopperSalts", "Copper Salts"},
	{"Count", "Count"},
	{"DexterAngry", "Dexter Cut"},
	{"DexterHappy", "Dexter Cut"},
	{"DexterMiffed", "Dexter Cut"},
	{"DexterSad", "Dexter Cut"},
	{"DexterSmoke", "Dexter Cut"},
	{"DexterWorried", "Dexter Cut"},
	{"DoofenshmirtzSad", "Dr. Heinz Doofenshmirtz"},
	{"DorinaHals", "Dorina Hals"},
	{"DrakeScared", "Drake"},
	{"EnderDragon", "Ender Dragon"},
	{"Ernie", "Ernie", "Bert and Ernie"},
	{"Fentanyl the Seal", ""}, -- idk
	{"FlagCocky", "Flag"},
	{"ForemanSpike", "Foreman Spike"},
	{"GirlIshmael", "Ishmael"},
	{"GreyCount", "Grey Count", "Count"},
	{"InspectorGadget", "Inspector Gadget"},
	{"JailedMuppets", "Jailed Muppets", "Statler and Waldorf"},
	{"Jeff", "Jeff", "Jeff Plecak"},
	{"JurtaEllipsis", "Jurta"},
	{"JurtaFacepalm", "Jurta"},
	{"JurtaFrown", "Jurta"},
	{"JurtaHappy", "Jurta"},
	{"JurtaPonder", "Jurta"},
	{"JurtaShocked", "Jurta"},
	{"JurtaSilly", "Jurta"},
	{"KingBoo", "King Boo"},
	{"LSB", "Leafy Speaer Box"},
	{"Louie", "Louie", "Olimar and Louie"},
	{"Luigi2", "Gay Luigi", "Luigi"},
	{"ManatLegsTalkshow", "Manat Legs Talkshow"},
	{"Mateangry", "Mate"},
	{"Mateconfident", "Mate"},
	{"Mateconfused", "Mate"},
	{"Matedelight", "Mate"},
	{"Matelost", "Mate"},
	{"Matelove", "Mate"},
	{"Matenurpoing", "Mate"},
	{"Matesad", "Mate"},
	{"Matesmile", "Mate"},
	{"Matesurprised", "Mate"},
	{"Mateworry", "Mate"},
	{"McDonaldsWorker", "McDonald's"},
	{"Mcdonald'sSweetn'SourSauce", "McDonald's Sweet n' Sour Sauce"},
	{"MediaWiki", "MediaWiki", "MediaWiki has been installed."},
	{"MichaelBay", "Michael Bay"},
	{"MikeMatei", "Mike Matei"},
	{"MineSteve", "Minecraft Steve"},
	{"MuscleMan", "Muscle Man"},
	{"MuscleManKO", "Muscle Man"},
	{"NCMallNeohomesFurnishingsShopkeeper", "NC Mall Neohomes Furnishings Shopkeeper"},
	{"NewsARoo", "News A Roo"},
	{"Niko2", "Niko"},
	{"Nikosus", "Niko"},
	{"NoahScared", "Noah"},
	{"NoahScared2", "Noah"},
	{"Number1Pen", "Number 1 Pen"},
	{"Number1Penthree", "Number 1 Pen"},
	{"Number1Pentwo", "Number 1 Pen"},
	{"NurseBoisterous", "Nurse Cap"},
	{"NurseChatterful", "Nurse Cap"},
	{"NurseChatty", "Nurse Cap"},
	{"NurseDetermined", "Nurse Cap"},
	{"NurseFierce", "Nurse Cap"},
	{"NurseGay", "Nurse Cap"},
	{"NurseOverwhelmed", "Nurse Cap"},
	{"NursePonderous", "Nurse Cap"},
	{"NurseScared", "Nurse Cap"},
	{"NurseSmile", "Nurse Cap"},
	{"NurseSorry", "Nurse Cap"},
	{"NurseStraight", "Nurse Cap"},
	{"NurseTicked", "Nurse Cap"},
	{"NurseSympathy", "Nurse Cap"},
	{"NurseSure", "Nurse Cap"},
	{"DiaNurseRealization", "Nurse Cap"},
	{"DiaNurseRealizationPAL", "Nurse Cap"},
	{"OMG TEXTY", "The Computer"},
	{"Okin1", "Okin"},
	{"Okin2", "Okin"},
	{"Okin3", "Okin"},
	{"OkinPeary", "Okin G. Peary"},
	{"PGLaugh", ""}, -- I don't know who these characters are so I'm gonna leave it to someone else to fill this one in.
	{"PaperNiko", "Paper Niko"},
	{"Parrot1", "Parrot 1", "Parrot and Parrot"},
	{"Parrot2", "Parrot 2", "Parrot and Parrot"},
	{"Parrotkiss", "Parrot and Parrot"},
	{"PizzaSkull", "Pizza Skull"},
	{"PizzaSkullJr", "Pizza Skull Jr.", "Category:Juniors"},
	{"RavioCheer", "Ravio"},
	{"RavioHappy", "Ravio"},
	{"RavioSad", "Ravio"},
	{"RiddlerSad", "Ravio"},
	{"SWExplode", "Statler and Waldorf"},
	{"SWLaugh", "Statler and Waldorf"},
	{"SWLaugh2", "Statler and Waldorf"},
	{"SWPoke", "Stantler and Walrein", "Statler and Waldorf"},
	{"Sadwalt", "Walter White"},
	{"SansClose", "Sans"},
	{"SansLook", "Sans"},
	{"SansWink", "Sans"},
	{"SansWink2", "Sans"},
	{"SchoolSuppliesTecho", "School Supplies Techo"},
	{"ShopWizard", "Shop Wizard"},
	{"SmoboGlance", "Smobo"},
	{"SmoboHappy", "Smobo"},
	{"SmoboJolly", "Smobo"},
	{"SmoboPhones", "Smobo"},
	{"SmoboPhonesGlance", "Smobo"},
	{"SmoboPhonesHappy", "Smobo"},
	{"Snow Spike", "Snow Spike", "Spike"},
	{"SockHater", "Sock Hater"},
	{"SoupFaerie", "Soup Faerie"},
	{"SpikeBaby", "Baby Spike", "Spike"},
	{"SpikeWin", "Spike"},
	{"SpookyFoodShopkeeper", "Spooky Food Shopkeeper"},
	{"Stantler", "Stantler", "Statler and Waldorf"},
	{"Statler", "Statler", "Statler and Waldorf"},
	{"StatlerBit", "Statler", "Statler and Waldorf"},
	{"StatlerBruce", "Statler", "Statler and Waldorf"},
	{"StatlerLook", "Statler", "Statler and Waldorf"},
	{"StatlerMario", "Statler", "Statler and Waldorf"},
	{"Statley", "Statley"},
	{"StatleyDeflation", "Statley"},
	{"StatleyWaldonfBloomberg", "Statley, Waldonf, and Michael Bloomberg", ""},
	{"StatleyWaldonfBloombergCount", "Statley, Waldonf, Michael Bloomberg, and Count", ""},
	{"StatleyWaldonfBloombergNoCount", "Statley, Waldonf, Michael Bloomberg, but no Count", ""},
	{"StatleyWaldonfNoBloombergNoCount", "Statley, Waldonf, but Michael Bloomberg or Count", "Statley and Waldonf"},
	{"StatleyWaldonfSpike", "Statley, Waldonf, and Spike", ""},
	{"StatleyWaldonfSpikeCount", "Statley, Waldonf, Spike, and Count", ""},
	{"SteveJobs", "Steve Jobs"},
	{"StoneSpike", "Stone Spike"},
	{"StoneSpikeBall", "Stone Spike Ball", "Seal on the Rocks"},
	{"TBFCreature", "TBF Creature"},
	{"TBHCreature", "TBH Creature"},
	{"Tagmahtohasser", "Tahmahtoh"},
	{"TheDeviousSeal32 Smirk", "TheDeviousSeal32"},
	{"TheDeviousSeal32withEarbuds", "TheDeviousSeal32"},
	{"TheKingOfAllCosmos", "The King Of All Cosmos"},
	{"TicoTems", "Tico Tems"},
	{"ToyBlocks", "Toy Blocks"},
	{"TropicalFoodShopkeeper", "Tropical Food Shopkeeper"},
	{"Versus", "Versus", "Playlist/Disappearance of Versus"},
	{"Vinci", "Leonardo da Vinci"},
	{"Waldorf", "Waldorf", "Statler and Waldorf"},
	{"WaldorfBoat", "Waldorf", "Statler and Waldorf"},
	{"WaldorfLook", "Waldorf", "Statler and Waldorf"},
	{"WaldorfPhone", "Waldorf", "Statler and Waldorf"},
	{"WaldorfSonic", "Waldorf", "Statler and Waldorf"},
	{"Walrein", "Walrein", "Statler and Waldorf"},
	{"WikiCamp2", "The Wiki Camp 2", "Main Page"},
	{"WorkshopTalkshow", "Workshop Talkshow"},
	{"YoutubeAnon", "YouTube Anon"},
	{"ZZUnknown", ""},
	{"Evil Pontalke.gif", "Evil Pontalke", "Pontalke"},
	
    {"?", "Unknown", ""},
    {"27ITBM", "27 is the best number", "User:27 is the best number"},
    {"4Intro", "Four"},
    {"8B", "8-Ball"},
    {"8Ball", "8-Ball"},
    {"8BallBite", "8-Ball"},
    {"8ballInhale", "8-Ball"},
    {"8ball", "8-Ball"},
    {"9ball", "9-Ball"},
    {"ABFDI", "A BFDI"},
    {"ABNTT", "A Better Name Than That"},
    {"ABNTTBleh", "A Better Name Than That and Bleh", ""},
    {"ActionPen", "Pen"},
    {"AirhornEB", "Airhorn", "User:EdwardBloxy"},
    {"AkivaS", "Akiva Schaffer", "wikipedia:Akiva Schaffer"},
    {"AndyS", "Andy Samberg", "wikipedia:Andy Samberg"},
    {"AngeryDavid", "David"},
    {"Angry 8-Ball", "8-Ball"},
    {"AngryFour", "Four"},
    {"Ann", "Announcer"},
    {"Apple", "Apple", "w:c:inanimateinsanity:Apple"},
    {"Arm", "Assets", "Assets/Faces and limbs"},
    {"Axol", "Axol", "w:c:supermarioglitchy4:Axol"},
    {"B Bag", "Barf Bag"},
    {"BallIcon", "Balloony"},
    {"BALLoony", "Balloony"},
    {"Balloony&Woody", "Balloony and Woody", ""},
    {"BalloonyDab", "Balloony"},
    {"BalloonyOrange", "Balloony"},
    {"BalloonyScream", "Balloony"},
    {"BarfBag", "Barf Bag"},
    {"BaskIcon", "Basketball"},
    {"Battle for B.F.D.I.", "Battle for BFDI"},
    {"BAWOONY", "Balloony"},
    {"BB", "Basketball"},
    {"BBall", "Basketball"},
    {"BBallOrange", "Basketball"},
    {"Beach Ball", "Beach Ball", "User:BFDI Rocky"},
    {"BellAngry", "Bell"},
    {"Bellay", "Bell and Naily", ""},
    {"BellIcon", "Bell"},
    {"BFDIFAN1234567", "BFDIFAN1234567", "User:BFDIFAN1234567"},
    {"BH", "Black Hole"},
    {"BHole", "Black Hole"},
    {"BHole&Bottle", "Black Hole and Bottle", ""},
    {"Billow", "Pillow"},
    {"BIM", "Black Internet Man", "User:EdwardBloxy"},
    {"BITBC", "Blue Is the Best Color Version 2", "User:Blue Is the Best Color Version 2"},
    {"BLiy", "Liy"},
    {"BloodySpongy", "Spongy"},
    {"Bluey", "BlueyColors", "User:EdwardBloxy"},
    {"BobSMG4", "Bob", "w:c:supermarioglitchy4:Bob"},
    {"Bocky", "Bocky", "Blocky"},
    {"Bomb", "Bomb", "w:c:inanimateinsanity:Bomb"},
    {"BombyP", "Bomby"},
    {"BombySmile", "Bomby"},
    {"BookAAA", "Book"},
    {"BookDerp", "Book"},
    {"BookHNG", "Book"},
    {"BoomMic", "Boom Mic"},
    {"Boopkins", "Fishy Boopkins", "w:c:supermarioglitchy4:Fishy Boopkins"},
    {"BottIcon", "Bottle"},
    {"BottleCookie", "Bottle"},
    {"BP", "Bubble and Pin"},
    {"BR", "Bubble and Ruby", "Ruby/Relationships#Bubble"},
    {"BraceletySign", "Bracelety"},
    {"BubbleEvil", "Evil Bubble"},
    {"BubbleIcon", "Bubble"},
    {"BubbleMetal", "Metal Bubble", "Bubble"},
    {"BubbleVsmile", "Bubble"},
    {"Caedmon", "Caedmon Johnson"},
    {"CakeExcited", "Cake"},
    {"CakesDad", "Cake's Dad", "Recommended Characters/BFB 7#cakes dad"},
    {"Callme", "Needle"},
    {"CameraMad", "Camera"},
    {"CarrotCake1", "Carrot Cake"},
    {"CarrotCake2", "Carrot Cake"},
    {"Cary", "Cary Huang"},
    {"CGINeedle", "Needle"},
    {"CharlesC", "Charles Calvin", "w:c:henrystickmin:Charles Calvin"},
    {"CheeseOrb", "Cheese Orb"},
    {"Choco", "ChocolateBliss", "User:ChocolateBliss"},
    {"CKH", "Cary Huang"},
    {"CloudyOrange", "Cloudy"},
    {"CloudyOrangeNoTape", "Cloudy"},
    {"CloudyTape", "Cloudy"},
    {"CoinyDEL", "Coiny"},
    {"CoinyIcon", "Coiny"},
    {"CompanionCubeEB", "Companion Cube", "User:EdwardBloxy"},
    {"Companionly", "Creator of Companionly", "User:DoodleYT"},
    {"ConchShell", "Conch Shell"},
    {"CultistEtG","The Cultist", ""},
    {"CursedAnn", "Cursed Announcer With Body"},
    {"Cutie", "Cutiesunflower", "User:Cutiesunflower"},
    {"DavidHueh", "David"},
    {"DavidOrange", "David"},
    {"Deimos", "Deimos", "wikipedia:Deimos (moon)"},
    {"DeimosMC", "Deimos", "w:c:madnesscombat:Deimos"},
    {"Derpy", "Derpyunikitty", "User:Derpyunikitty"},
    {"Derpyunikitty", "Derpyunikitty", "User:Derpyunikitty"},
    {"Desti", "Desti", "w:c:supermarioglitchy4:Desti"},
    {"Dia", "Dia", "Template:Dia"},
    {"Dino", "michael as a dinosaur", "Recommended Characters/BFB 12"},
    {"Don't call me Needy!", "Needle"},
    {"DonutHWA", "Donut"},
    {"DonutSo", "Donut"},
    {"DonutVomit", "Donut"},
    {"Doodle", "DoodleYT", "User:DoodleYT"},
    {"DoraPonytail", "Dora"},
    {"DPACT", "Death P.A.C.T."},
    {"Duck", "A duck"},
    {"Edward", "EdwardBloxy", "User:EdwardBloxy"},
    {"EFCR", "Eraser, Firey, Coiny and Ruby", ""},
    {"Eggs", "ScribbledEggs", "User:ScribbledEggs"},
    {"EightEEE", "Eight"},
    {"EightNew", "Eight"},
    {"ELeafy", "Evil Leafy"},
    {"EllieRose", "Ellie Rose", "w:c:henrystickmin:Ellie Rose"},
    {"Empty", ""},
    {"Enzo", "Enzosmile", "User:Enzosmile"},
    {"EpeeFencing", "Epee", "User:Minardi-LMS"},
    {"EraserIcon", "Eraser"},
    {"Everyone", "Everyone", "List of Battle for Dream Island characters"},
    {"EvilLeafy", "Evil Leafy"},
    {"Ex", "X"},
    {"Fanny(Old)", "Fanny"},
    {"fannyascii", "Fanny"},
    {"FannyIcon", "Fanny"},
    {"fannymatrix", "Fanny"},
    {"FannyOld", "Fanny"},
    {"Fannyy", "Fanny"},
    {"FearfulWarpII", "FearfulWarpII", "User:FearfulWarpII"},
    {"FF", "Free Food"},
    {"FFBGMPR", "Bomby, Firey, Foldy, Gelatin, Marker, Pie, Ruby", ""},
    {"Fies", "Fies", "Fries"},
    {"Firey thing", "Firey"},
    {"FireyAAA", "Firey"},
    {"FireyJr", "Firey Jr."},
    {"Fireyjr", "Firey Jr."},
    {"FireyLeafy", "Firey and Leafy"},
    {"FireyLeafyPen", "Firey, Leafy and Pen", ""},
    {"FireyMad", "Firey"},
    {"FireyMetal", "Metal Firey", "Firey"},
    {"FireyOld", "Firey"},
    {"FireySB", "Firey Speaker Box"},
    {"FishMonster", "Fish Monster"},
    {"FiveEEE", "Five"},
    {"Fizzy", "Fizzy", "User:GenericGenerator999"},
    {"Flamingo", "AlbertsStuff", "w:c:youtube:Flamingo"},
    {"Flour", "Flower"},
    {"FlowerAnnouncer", "Flower Speaker Box"},
    {"FlowerIcon", "Flower"},
    {"FlowerMetal", "Metal Flower", "Flower"},
    {"FlowerSB", "Flower Speaker Box"},
    {"For", "Four"},
    {"four with extra cripple nipple", "Four"},
    {"Four's Assets 2nd", "Four"},
    {"FourAngry", "Four"},
    {"FourBeat", "Four"},
    {"FourEE", "Four"},
    {"FourEEE", "Four"},
    {"FourEugh", "Four"},
    {"FourEvil", "Four"},
    {"FourFat", "Four"},
    {"FourGoodJob", "Four"},
    {"FourIntro", "Four"},
    {"Fourintro", "Four"},
    {"FourKiller", "Four"},
    {"FourMeltedAngry", "Four"},
    {"FourNextLevelMad", "Four"},
    {"FourOMG", "Four "},
    {"FourReallyEvilLoudestScreech", "Four"},
    {"FourScreech", "Four"},
    {"FourShocked", "Four"},
    {"FourSoil", "Four"},
    {"FourSirPelo", "Four"},
    {"FourSrPelo", "Four"},
    {"FourSrPeloEEE", "Four"},
    {"FourThinking", "Four"},
    {"FourUH OH", "Four"},
    {"FourX", "Four and X"},
    {"Fouryyyyyyyyyyyyy", "Four"},
    {"FreddieFreaker", "Freddie Freaker", "w:c:freddiefreaker:Freddie Freaker"},
    {"FreeFood", "Free Food"},
    {"FreeSmarters", "FreeSmarters", "FreeSmart"},
    {"FriesPoisoned", "Fries"},
    {"FriesShock", "Fries"},
    {"FS", "Foldy and Stapy"},
    {"FSM", "Foldy, Stapy and Marker", ""},
    {"Furrin", "Furrin", "User:RyoTheDragonGuy RBLX"},
    {"GamerSponge", "Gamer Spongebob", "User:Lolguy23"},
    {"Gamey", "Gamey", "w:c:object-overload:Gamey"},
    {"Gatty", "Gaty"},
    {"GB", "Golf Ball"},
    {"GB8B", "Golf Ball and 8-Ball", ""},
    {"GBad", "Golf Ball"},
    {"GBPoisoned", "Golf Ball"},
    {"GBWut", "Golf Ball"},
    {"GelatinHappyToYou", "Gelatin"},
    {"GelatinMucinex", "Gelatin"},
    {"GelatinTinkle", "Gelatin"},
    {"GelatinZappy", "Gelatin"},
    {"Gelitan", "Gelatin"},
    {"GettingTeardropToTalk", "Getting Teardrop to Talk"},
    {"GN", "Gelatin and Naily", "Gelatin/Relationships#Naily"},
    {"Golden globe", "Golden globe", ""},
    {"GolfBall", "Golf Ball"},
    {"GP", "Gaty and Pillow", ""},
    {"GreenMarker", "Green Marker", "User:Green Marker Official"},
    {"GreenRocky", "Green Rocky", "Variations of Rocky#Green Rocky"},
    {"GSSB", "Green Small Speaker Box"},
    {"HELLOKEVIN", "HelloKevin"},
    {"HelloKevin!", "HelloKevin"},
    {"HenryS", "Henry Stickmin", "w:c:henrystickmin:Henry Stickmin"},
    {"Hex", "Hexlime", ""},
    {"HKevin", "HelloKevin"},
    {"HSBTSB", "Hexagon Speaker Box and Triangle Speaker Box", ""},
    {"HWA HWA HWA. Foo.", "Ruby"},
    {"HoverboardEB", "Hoverboard", "User:EdwardBloxy"},
    {"IAM", "It's a Monster"},
    {"Iancian", "Iance"},
    {"IC", "Ice Cube"},
    {"ICYBrace", "Bracelety"},
    {"Icecube", "Ice Cube"},
    {"ICNAO", "Ice Cube"},
    {"IcOld", "Ice Cube"},
    {"IloveRumania", "IloveRumania", "User:IloveRumania"},
    {"IN3", "Insectophobe's Nightmare 3"},
    {"ITRD", "Income Tax Return Document"},
    {"Jaiden", "Jaiden", "User:Ozarcusmapesae/Jaiden"},
    {"JormaT", "Jorma Taccone", "wikipedia:Jorma Taccone"},
    {"JubJub", "JubJub Boopkins", "w:c:supermarioglitchy4:JubJub Boopkins"},
    {"KingCake", "King Cake", "Variations of Cake#King Cake"},
    {"KitchenSink", "Kitchen Sink"},
    {"LB", "Lego Brick"},
    {"LegoBrick", "Lego Brick"},
    {"LeafyandRuby", "Leafy and Ruby", "Leafy/Relationships#Ruby"},
    {"LeafyWut", "Leafy"},
    {"Leefey", "Leefey", "Leafy"},
    {"Lightbulb2", "Lightbulb"},
    {"LightningDigging", "Lightning"},
    {"Line", "Liy and Bell", ""},
    {"LiyIsDum", "LiyISDumb21", "User:LiyISDumb21"},
    {"LiyisDum", "LiyISDumb21", "User:LiyISDumb21"},
    {"LiyIsDumb21", "LiyISDumb21", "User:LiyISDumb21"},
    {"LNEC", "Leafy, Needle, Eggy and Clock", ""},
    {"logueRoboty", "Roboty"},
    {"Lollipo", "Lollipop"},
    {"LoserBut", "Loser"},
    {"LoserLick", "Loser"},
    {"LP", "Leafy and Pin"},
    {"MarioSMG4", "Mario", "w:c:supermarioglitchy4:Mario"},
    {"Mark", "Marker"},
    {"MatchBlue", "Blue Match", "Match"},
    {"MatchRuby", "Match and Ruby", "Ruby/Relationships#Match"},
    {"Me", "Me", "Special:MyPage"},
    {"Megan", "Megan", "User:TnT20052013isbackagain"},
    {"MeganBFB7", "Megan W.", "Recommended Characters/BFB_7#Megan_W."},
    {"MeggyS", "Meggy Spletzer", "w:c:supermarioglitchy4:Meggy Spletzer"},
    {"MelonySMG4", "Melony", "w:c:supermarioglitchy4:Melony"},
    {"MePhone 4", "MePhone4"},
    {"MetalBook", "Metal Book", "Book"},
    {"MetaLeafy", "Metal Leafy", "Leafy"},
    {"MetalPin", "Metal Pin", "Pin"},
    {"MilkCartonEB", "Milk Carton", "User:EdwardBloxy"},
    {"MrBeast", "MrBeast6000", "w:c:youtube:MrBeast"},
    {"MSDOS3000", "MSDOS3000", "User blog:DoodleYT/tell the ms-dos 3000 some questions"},
    {"MS-DOSEB", "MS-DOS Computer", "User:EdwardBloxy"},
    {"Multilation", "Mutilation"},
    {"Naedle", "Naedle", "Needle"},
    {"NateGroth", "Nate Groth"},
    {"NewNickel", "Nickel"},
    {"NewSaw", "Saw"},
    {"NewYoyleBook", "YoyleBook", "User:AnonymousUser the II"},
    {"NickelNew", "Nickel"},
    {"NickelOrange", "Nickel"},
    {"NMS", "No More Snow!"},
    {"OctR", "OctRTheEggYolk", "User:OctRTheEggYolk"},
    {"OJ", "OJ", "w:c:inanimateinsanity:OJ"},
    {"Old3", "Three"},
    {"Old4", "Four"},
    {"OldFour", "Four"},
    {"OldProfily", "Profily"},
    {"OldRFlower", "Robot Flower"},
    {"OldX", "X"},
    {"OneEEE", "One"},
    {"OrangeBalloony", "Balloony"},
    {"OSS", "SOTP SIGN"},
    {"Outlet", "Outlet", "User:Pancaiks&Butter"},
    {"PARAPPARULEZ", "PARAPPARULEZ", "User:PARAPPARULEZ"},
    {"PandoraBook", "Pandora Book", "Recommended Characters/BFB 4#Pandora Book"},
    {"ParkKunPicture", "ParkKun Picture", "User:ChuMan812"},
    {"PB", "Puffball"},
    {"PBSB", "Puffball Speaker Box"},
    {"PCSB", "Purple Round Speaker"},
    {"PenCapless","Pen"},
    {"PenEraser", "Pen and Eraser", "Eraser and Pen"},
    {"PencilHNG", "Pencil"},
    {"Pendy", "Pendy", "User:ABetterNameThanThat"},
    {"Penhwat", "Pen"},
    {"PenIcon", "Pen"},
    {"Pentagon", "Pentagon", "Pentagon (item)"},
    {"PF", "Purple Face"},
    {"Pffbll", "Puffball"},
    {"PFSmile", "Purple Face"},
    {"PhatCloudy", "Cloudy"},
    {"PieTeamIcon", "Pie"},
    {"PillowRunning", "Pillow"},
    {"PinWhite", "Pin"},
    {"PlushLeafy", "Leafy plush"},
    {"PM", "Match and Pencil"},
    {"PMP", "Portable Music Player"},
    {"Po", "Po", "User blog:DisgustingPepsi2/Po"},
    {"Polandball", "Polandball", "w:c:polandball:Polandball"},
    {"PriceTag", "Price Tag"},
    {"PriceTagEpic", "Price Tag"},
    {"PRS", "Purple Round Speaker"},
    {"Rainbomb", "ObjectReater", "User:ObjectReater"},
    {"RandomWoody", "Woody"},
    {"Recording", "Recording", "BFB 8"},
    {"Remaker", "TWDremaker2000", "User:TWDremaker2000"},
    {"RemoteNiceCatch", "Remote"},
    {"RFlower", "Robot Flower"},
    {"RiSct", "BFDISScuti2", "User:BFDISScuti2"},
    {"RobotFlower", "Robot Flower"},
    {"RockyEvil", "Rocky"},
    {"RockyIcon", "Rocky"},
    {"RockyOrange", "Rocky"},
    {"Rosie", "Rosey", "User:PossiblyKimi"},
    {"RS", "Rolling Stone", "User:EdwardBloxy"},
    {"RubberDucky", "A duck"},
    {"RubberSpatula", "Rubber Spatula"},
    {"RubberSpatulaSpeed", "Rubber Spatula"},
    {"RubyCry", "Ruby"},
    {"RubyHWA", "Ruby"},
    {"RubyMetal", "Metal Ruby", "Ruby"},
    {"RuinedRuby", "Ruby"},
    {"RustyCoin", "Rusty Coin"},
    {"ryOfAWeirdSpeakerBox", "Announcer's Diary", "Hidden or brief messages#Announcer.27s Diary:"},
    {"RZ45", "REDZONE45", "User:REDZONE45"},
    {"SaikoB", "Saiko Bichitaru", "w:c:supermarioglitchy4:Saiko Bichitaru"},
    {"SaltLamp", "Salt Lamp"},
    {"Sanford", "Sanford", "w:c:madnesscombat:Sanford"},
    {"SARS-CoV-2", "SARS-CoV-2", "w:c:bfdia-remade:SARS-CoV-2"},
    {"SatisfactionDetector", "Satisfaction Detector"},
    {"SawNoHandle", "Saw"},
    {"SawOrange","Saw"},
    {"SB", "Snowball"},
    {"Sball", "Snowball"},
    {"SBSB", "Spike Ball Speaker Box"},
    {"Scorbunnin", "Scorbunnin", "User:Floofyfurret"},
    {"ScribbledEggs", "ScribbledEggs", "User:ScribbledEggs"},
    {"SeeingPerson", "Yellow Face"},
    {"SevenEEE", "Seven"},
    {"ShoppingCart", "Shopping Cart"},
    {"Shrek", "Shrek", "w:c:shrek:Shrek (character)"},
    {"Shroomy", "Shroomy", "w:c:supermarioglitchy4:Shroomy"},
    {"ShroomyDH", "Shroomy", "w:c:supermarioglitchy4:Shroomy"},
    {"Sign", "Sign", ""},
    {"SixEEE", "Six"},
    {"Slapoda", "Slapoda stands", "User:SlapodaRadiation"},
    {"Slime", "Tennis Ball"},
    {"SmallIC", "Ice Cube"},
    {"SMG3", "SuperMarioGlitchy3", "w:c:supermarioglitchy4:SMG3"},
    {"SMG4", "SuperMarioGlitchy4", "w:c:supermarioglitchy4:SMG4"},
    {"SnareDrum", "Snare Drum"},
    {"Snowbubble", "Snowbubble", "User:SaifTheSnobble"},
    {"SoftTC", "Soft Tyre Compound", "User:Minardi-LMS"},
    {"SotpSign", "SOTP SIGN"},
    {"Spongezilla", "Spongezilla", "Recommended Characters/BFB 7#spongezilla"},
    {"SpongyDark", "Spongy"},
    {"Spongebob", "Spongebob", "w:c:spongebob:SpongeBob SquarePants"},
    {"SpongyIcon", "Spongy"},
    {"BlueSpongy", "Blue Spongy", "Variations of Spongy#Blue Spongy"},
    {"SpongyMetal", "Metal Spongy", "Spongy"},
    {"SuperMarioBlock", "mario block", "User:Waffleboi123"},
    {"SurpriseEgg", "Surprise Egg", ""},
    {"SwordInfinity", "Sword"},
    {"Tari", "Tari", "w:c:supermarioglitchy4:Tari"},
    {"TB", "Tennis Ball"},
    {"TBGB", "Tennis Ball and Golf Ball"},
    {"TD", "Teardrop"},
    {"Teardr0p", "Teardr0p", "Teardrop"},
    {"TennisBall", "Tennis Ball"},
    {"ThreeEEE", "Three"},
    {"Timemaster", "Timemaster", "User:EdwardBloxy"},
    {"TL", "The Losers!"},
    {"TLLYC", "The Long-lost Yoyle City"},
    {"TooLongDidntListen", "Yellow Face"},
    {"TP", "Toilet Paper", "User:StillNotOriginal/OCs"},
    {"TreeOld", "Tree"},
    {"Treetop", "Teardrop"},
    {"TreeV", "Tree"},
    {"Triangle", "Triangle", "A Leg Up in the Race/Recommended characters"},
    {"TriangleSB", "Triangle Speaker Box"},
    {"Triggered8Ball", "8-Ball"},
    {"Turbocharger", "Turbocharger", "User:Minardi-LMS"},
    {"TwoEEE", "Two"},
    {"Twomad", "twomad", "w:c:youtube:twomad"},
    {"TwoPain", "Two"},
    {"Tyler878", "Tyler878", "User:Tyler878"},
    {"UltraLeoGX", "UltraLeoGXExpert AUTTP", "User:UltraLeoGXExpert AUTTP"},
    {"United States", "The United States of America", "wikipedia:United States"},
    {"Unknown", "Unknown", ""},
    {"USA", "The United States of America", "wikipedia:United States"},
    {"USBAni", "USB", "User:Aaniiball"},
    {"VanWoody789", "VanWoody789", "User:VanWoody789"},
    {"Violety", "Violety", "User:PossiblyKimi"},
    {"VolumeS", "Volume Symbol", "User:EdwardBloxy"},
    {"Walten", "Walt Tophat", "User:Walten Paperclips"},
    {"WIM", "White Internet Man", "User:EdwardBloxy"},
    {"WinnerThink", "Winner"},
    {"WinToken", "Win Token"},
    {"Woody Dab", "Woody"},
    {"WoodyAAA", "Woody"},
    {"WoodyDab", "Woody"},
    {"Woodydab", "Woody"},
    {"WoodyDabDab", "Woody"},
    {"WoodyOrange", "Woody"},
    {"WoodyOrangeDented", "Woody"},
    {"X 2", "X"},
    {"XAngry", "X"},
    {"XBandAided", "X"},
    {"XCry", "X"},
    {"Xcry", "X"},
    {"XEEE", "X"},
    {"XFHV 4", "Four"},
    {"XIntro", "X"},
    {"Xjing", "X"},
    {"XKiller", "X"},
    {"Xmad", "X"},
    {"Xno", "X"},
    {"Xreading", "X"},
    {"XScared", "X"},
    {"XSrPelo", "X"},
    {"XThinking", "X"},
    {"XUnhappy", "X"},
    {"XWorried", "X"},
    {"YellowFace", "Yellow Face"},
    {"YF", "Yellow Face"},
    {"YFFrown", "Yellow Face"},
    {"You", "You", "Special:MyPage"},
    {"YTPBook", "YTPBook", "User:YTPmachine123"},
    {"YWIWK", "Yeah, Who? I Wanna Know"},
    {"Nerd", "Bozo"},    
    {"ZBD", "Zeeky Boogy Doog"},
    {"ZZUnknown", "Unknown", ""},
    {"ZZunknown", "Unknown", ""},
}

--[[
code

This function returns the corresponding alt text or the link destination for the
specified code.

Usage:
{{#invoke:Dia code|code|specified_code|link_or_alt}}

Specify the code in the first parameter. If the second parameter is equal to
"alt", the function will return the corresponding alt text for the code.
Otherwise, the function will return the link destination for the code.

If the code doesn't exist in the codes table (because the filename for the Dia
template is exactly equal to the character's name), the code itself is returned,
regardless of the second parameter.
]]

function p.code( frame )
    c = mw.text.trim(frame.args[1]);
    for i, a in ipairs(codes) do
        if a[1] == c then
            if not ( frame.args[2] == "alt" or a[3] == nil ) then
                return a[3];
            else
                return a[2];
            end
        end
    end
    return c;
end

return p;