Module

local p = {}

-- Returns a list of all the args with numbered values up until one doesn't exist OR all the items in wiki list format in the first param
function p.mergeArgsSyntax(args, start, pattern)

```
   -- Check if list format is being used
   local pattern, start = pattern or '%s*%*+%s*', tonumber(start) or 1

   local function _tostring(v)
   	if type(v) == "table" then
   		return table.concat(v)
   	elseif type(v) == "boolean" or v == nil or type(v) == "number" or type(v) == "function" then
   		return tostring(v)
   	else
   		return v
   	end
   end

   args[start] = _tostring(args[start])

   if args[start]:match(pattern) then
       local list = mw.text.split(args[start], pattern)

       list[1] = _tostring(list[1])

       if not list[1] or list[1] ==
           then table.remove(list,1)
       end

       return list

   elseif args[start] and not args[start]:match("%*") and not args[start+1] then

       return {args[start]}
   end
   --else
   local list, i = {}, start

   while args[i] do
       list[#list+1] = _tostring(args[i])
       i = i + 1
   end

   return list

```

end

return p

local teams = {
 ['Red Rabbits'] = { color = '#fe6866' },
 ['Red Ravens'] = { color = '#fe6866' },
 ['Red Reindeer'] = { color = '#fe6866' },
 ['Krimson Krakens'] = { color = '#fe6866' },

 ['Orange Ocelots'] = { color = '#ffa758' },
 ['Orange Oozes'] = { color = '#ffa758' },
 ['Coral Carollers'] = { color = '#ffa758' },
 ['Ginger Breadmen'] = {color = '#ffa758' },

 ['Yellow Yaks'] = { color = '#edd76a' },
 ['Yellow Chickens'] = { color = '#edd76a' },
 ['Yellow Yetis'] = { color = '#edd76a' },
 ['Yellow Yolks'] = { color = '#edd76a' },
 ['Mustard Mummies'] = { color = '#edd76a' },

 ['Lime Llamas'] = { color = '#69ed12' },
 ['Lime Liches'] = { color = '#69ed12' },
 ['Mint Mistletoes'] = { color = '#69ed12' },

 ['Green Geckos'] = {color = '#04ad26'},
 ['Green Guardians'] = { color = '#04ad26' },
 ['Green Goblins'] = { color = '#04ad26' },
 ['Emerald Elves'] = { color = '#04ad26' },

 ['Cyan Coyotes'] = {color = '#00baa4'},
 ['Cyan Creepers'] = { color = '#00baa4' },
 ['Cyan Centipedes'] = { color = '#00baa4' },
 ['Cyan Candy Canes'] = { color = '#00baa4' },
 ['Teal Turkeys'] = { color = '#00baa4' },

 ['Aqua Axolotls'] = { color = '#01ccf0' },
 ['Aqua Horses'] = { color = '#01ccf0' },
 ['Aqua Abominations'] = { color = '#01ccf0' },
 ['Cerulean Candy Canes'] = { color = '#01ccf0'},

 ['Blue Bats'] = { color = '#5d57fd' },
 ['Blue Banshees'] = { color = '#5d57fd' },
 ['Blue Black Cats'] = { color = '#5d57fd' },
 ['Sapphire Simmers'] = { color = '#5d57fd' },
 ['Sapphire Santas'] = {color = '#5d57fd' },

 ['Purple Pandas'] = { color = '#a334e8' },
 ['Purple Penguins'] = { color = '#a334e8' },
 ['Violet Vampires'] = { color = '#a334e8' },

 ['Pink Parrots'] = { color = '#f22adf' },
 ['Pink Piglets'] = { color = '#f22adf' },
 ['Pink Presents'] = { color = '#f22adf' },
 ['Fuchsia Frankensteins'] = { color = '#f22adf' },

 -- mcc jj teams
 ['Simon\'s Angels'] = { color = '#fe6866' },
 ['What the Flux!?'] = { color = '#ffa758' },
 ['Rick Astley\'s Shorts'] = { color = '#edd76a' },
 ['Dodgy Doodlers'] = { color = '#69ed12' },
 ['The Goblins'] = { color = '#04ad26' },
 ['Not the Red Team'] = {color = '#00baa4'},
 ['G.O.A.T'] = { color = '#01ccf0'},
 ['Power Bottoms'] = {color = '#5d57fd' },
 ['BEEEEEEEES'] = { color = '#a334e8' },
 ['UH OH CHONKY'] = { color = '#f22adf' }
}

local mcc = {
 JJ = { short = 'MCC JJ', full = 'Yogscast\'s Jingle Jam MCC' },
 P21 = { short = 'MCC P21', full = 'MC Championship Pride 2021' },
 R = { short = 'MCC R', full = 'MC Championship Rising' },
 AS = { short = 'MCC AS', full = 'MC Championship All-Stars' },
 P22 = { short = 'MCC P22', full = 'MC Championship Pride 2022' },
}

local games = {
 AR = { icon = 'AceRace-Icon.png', link = 'Ace Race', name = 'Ace Race' },
 BB = { icon = 'BattleBox-Icon.png', link = 'Battle Box', name = 'Battle Box' },
 BBF = { icon = 'BingoButFast-Icon.png', link = 'Bingo But Fast', name = 'Bingo But Fast' },
 BM = { icon = 'BSABM-Icon.png', link = 'Build Mart', name = 'Build Mart' },
 BSABM = { icon = 'BSABM-Icon.png', link = 'Build Mart', name = 'Big Sales at Build Mart' },
 DD = {icon = 'Unknown-Icon.png', link = 'Decision Dome', name = 'Decision Dome'},
 DB = { icon = 'Dodgebolt-Icon.png', link = 'Dodgebolt', name = 'Dodgebolt' },
 DBE = { icon = 'Dodgebolt-Icon.png', link = 'Dodgebolt', name = 'Eggbolt' },
 DBW = { icon = 'Dodgebolt-Icon.png', link = 'Dodgebolt', name = 'Witchbolt' },
 DBS = { icon = 'Dodgebolt-Icon.png', link = 'Dodgebolt', name = 'Snowbolt' },
 FR = { icon = 'AceRace-Icon.png', link = 'Foot Race', name = 'Foot Race' },
 GR = { icon = 'GridRunners-Icon.png', link = 'Grid Runners', name = 'Grid Runners' },
 HITW = { icon = 'HoleInTheWall-Icon.png', link = 'Hole in the Wall', name = 'Hole in the Wall' },
 LB = { icon = 'BingoButFast-Icon.png', link = 'Lockout Bingo', name = 'Lockout Bingo' },
 MD = {icon = 'Meltdown-Icon.png', link = 'Meltdown', name = 'Meltdown',},
 PT ={ icon = 'ParkourTag-Icon.png', link = 'Parkour Tag', name = 'Parkour Tag' },
 PW = { icon = 'ParkourWarrior-Icon.png', link = 'Parkour Warrior', name = 'Parkour Warrior' },
 RS = { icon = 'RocketSpleef-Icon.png', link = 'Rocket Spleef', name = 'Rocket Spleef' },
 RSR = {icon = 'RocketSpleef-Icon.png', link = 'Rocket Spleef Rush', name = 'Rocket Spleef Rush' },
 SBA = { icon = 'SkyBattle-Icon.png', link = 'Sky Battle', name = 'Sky Battle' },
 SBL = { icon = 'Skyblockle-Icon.png', link = 'Skyblockle', name = 'Skyblockle' },
 SG = { icon = 'SurvivalGames-Icon.png', link = 'Survival Games', name = 'Survival Games' },
 SOT = { icon = 'SandsOfTime-Icon.png', link = 'Sands of Time', name = 'Sands of Time' },
 SNOT = { icon = 'SandsOfTime-Icon.png', link = 'Sands of Time', name = 'Snows of Time' },
 TGTTOS = { icon = 'TGTTOS-Icon.png', link = 'TGTTOSAWAF', name = 'TGTTOS' },
 TGTTOSAWAF = { icon = 'TGTTOS-Icon.png', link = 'TGTTOSAWAF', name = 'TGTTOSAWAF' },
 TGTTOSAWAMCCP = { icon = 'TGTTOS-Icon.png', link = 'TGTTOSAWAF', name = 'TGTTOSAWAMCCP' },
 TGTTOSAWAMCCPWHNWAEY = { icon = 'TGTTOS-Icon.png', link = 'TGTTOSAWAF', name = 'TGTTOSAWAMCCPWHNWAEY' },
}

return {
 teams = teams,
 mcc = mcc,
 games = games,
}

local teams = {
-- If new team names are added, new aliases can be added here!
-- The aliase on the left: spaces should be replaced by underscore; input in full lowercase
-- The name on the right MUST BE the same as the file name
-- Alternatively, the right value can be a table { file = *, alt =*  }

-- group1: Red Teams
 rrab = 'Red Rabbits',
 rabbit = 'Red Rabbits',
 red\_rabbits = 'Red Rabbits',
-- other Red Teams
 red\_ravens = 'Red Ravens',
 red\_reindeer = 'Red Reindeer',
 krimson\_krakens = 'Krimson Krakens',

-- group2: Orange Teams
 ooce = 'Orange Ocelots',
 ocelot = 'Orange Ocelots',
 orange\_ocelots = 'Orange Ocelots',
-- other Orange Teams
 orange\_oozes = 'Orange Oozes',
 coral\_carollers = 'Coral Carollers',
 ginger\_breadmen = 'Ginger Breadmen',
 gingerbread\_men = 'Ginger Breadmen',

-- group3: Yellow Teams
 yyak = 'Yellow Yaks',
 yak = 'Yellow Yaks',
 yellow\_yaks = 'Yellow Yaks',
-- other Yellow Teams
 yellow\_chickens = 'Yellow Chickens',
 yellow\_yetis = 'Yellow Yetis',
 yellow\_yolks = 'Yellow Yolks',
 mustard\_mummies = 'Mustard Mummies',

-- group4: Lime Teams
 llla = 'Lime Llamas',
 llama = 'Lime Llamas',
 lime\_llamas = 'Lime Llamas',
-- other Lime Teams
 lime\_liches = 'Lime Liches',
 mint\_mistletoes = 'Mint Mistletoes',

-- group5: Green Teams
 ggec = 'Green Geckos',
 geckos = 'Green Geckos',
 green\_geckos = 'Green Geckos',
-- other Green Teams
 ggua = 'Green Guardians',
 guardian = 'Green Guardians',
 green\_guardians = 'Green Guardians',
 green\_goblins = 'Green Goblins',
 emerald\_elves = 'Emerald Elves',

-- group6: Cyan Teams
 ccoy = 'Cyan Coyotes',
 coyotes = 'Cyan Coyotes',
 cyan\_coyotes = 'Cyan Coyotes',
-- other Cyan Teams
 ccre = 'Cyan Creepers',
 creeper = 'Cyan Creepers',
 cyan\_creepers = 'Cyan Creepers',
 cyan\_centipedes = 'Cyan Centipedes',
 cyan\_candy\_canes = 'Cyan Candy Canes',

-- group7: Aqua Teams
 aaxo = 'Aqua Axolotls',
 axolotl = 'Aqua Axolotls',
 aqua\_axolotls = 'Aqua Axolotls',
-- other Aqua Teams
 aqua\_horses = 'Aqua Horses',
 aqua\_abominations = 'Aqua Abominations',
 teal\_turkeys = 'Teal Turkeys', -- both in aqua and cyan
 cerulean\_candy\_canes = 'Cerulean Candy Canes',

-- group8: Blue Teams
 bbat = 'Blue Bats',
 bat = 'Blue Bats',
 blue\_bats = 'Blue Bats',
-- other Blue Teams
 blue\_black\_cats = 'Blue Black Cats',
 sapphire\_santas = 'Sapphire Santas',
 sapphire\_simmers = 'Sapphire Simmers',

-- group9: Purple Teams
 ppan = 'Purple Pandas',
 panda = 'Purple Pandas',
 purple\_pandas = 'Purple Pandas',
-- other Purple Teams
 purple\_penguins = 'Purple Penguins',
 violet\_vampires = 'Violet Vampires',

-- group10: Pink Teams
 ppar = 'Pink Parrots',
 parrot = 'Pink Parrots',
 pink\_parrots = 'Pink Parrots',
-- other Pink Teams
 pink\_piglets = 'Pink Piglets',
 pink\_presents = 'Pink Presents',
 fuchsia\_frankensteins = 'Fuchsia Frankensteins',
}

local mcc = {
 jj = 'JJ',
 yogcast = 'JJ',
 jingle = 'JJ',
 ['jingle jam'] = 'JJ',
 ['yogscast\'s jingle jam mcc'] = 'JJ',

 p21 = 'P21',
 ['pride 21'] = 'P21',
 ['pride 2021'] = 'P21',
 ['mcc pride 2021'] = 'P21',
 ['mc championship pride 2021'] = 'P21',

 r = 'R',
 rising = 'R',
 ['mcc rising'] = 'R',
 ['mc championship rising'] = 'R',

 as = 'AS',
 allstars = 'AS',
 ['all-stars'] = 'AS',
 ['mcc all-stars'] = 'AS',
 ['mc championship all-stars'] = 'AS',

 p22 = 'P22',
 ['pride 22'] = 'P22',
 ['pride 2022'] = 'P22',
 ['mcc pride 2022'] = 'P22',
 ['mc championship pride 2022'] = 'P22',
}

local games = {
 ['ar'] = 'AR',
 ['ace'] = 'AR',
 ['ace race'] = 'AR',

 ['bb'] = 'BB',
 ['battle box'] = 'BB',

 ['bbf'] = 'BBF',
 ['bingo but fast'] = 'BBF',

 ['bm'] = 'BSABM',
 ['bsabm'] = 'BSABM',
 ['big sales at build mart'] = 'BSABM',

 ['db'] = 'DB',
 ['dodgebolt'] = 'DB',

 ['witchbolt'] = 'DBW',
 ['snowbolt'] = 'DBS',
 ['eggbolt'] = 'DBE',

 ['decision dome'] = 'DD',

 ['fr'] = 'FR',
 ['foot'] = 'FR',
 ['foot race'] = 'FR',

 ['gr'] = 'GR',
 ['grid'] = 'GR',
 ['grid runners'] = 'GR',

 ['hitw'] = 'HITW',
 ['hole in the wall'] = 'HITW',

 ['lb'] = 'LB',
 ['lockout bingo'] = 'LB',

 ['md'] = 'MD',
 ['meltdown'] = 'MD',

 ['pt'] = 'PT',
 ['parkour tag'] = 'PT',

 ['pw'] = 'PW',
 ['parkour warrior'] = 'PW',

 ['rs'] = 'RS',
 ['rocket spleef'] = 'RS',

 ['rsr'] = 'RSR',
 ['rocket spleef rush'] = 'RSR',

 ['sb'] = 'SBA',
 ['sba'] = 'SBA',
 ['sky battle'] = 'SBA',

 ['sbk'] = 'SBL',
 ['sbl'] = 'SBL',
 ['skyblockle'] = 'SBL',

 ['sg'] = 'SG',
 ['survival games'] = 'SG',

 ['sot'] = 'SOT',
 ['snot'] = 'SNOT',
 ['sands of time'] = 'SOT',
 ['snows of time'] = 'SNOT',

 ['tgttos'] = 'TGTTOS',
 ['tgttosawaf'] = 'TGTTOSAWAF',
 ['tgttosawamccp'] = 'TGTTOSAWAMCCP',
 ['tgttosawamccpwhnwaey'] = 'TGTTOSAWAMCCPWHNWAEY',
}

return {
 teams = teams,
 mcc = mcc,
 games = games,
}