Module:CryptogullJr/Codes: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 51: Line 51:
extTable = {
extTable = {
['aa'] = {"Chimera", ""},
['aa'] = {"Chimera", ""},
['ab'] = {"Esper", ""},
['uu'] = {"Unstable Genome", ""},
['ba'] = {"Adrenal Control", ""},
['bb'] = {"Burrowing Claws", ""},
['bc'] = {"Corrosive Gas Generation", ""},
['bd'] = {"Double-muscled", ""},
['be'] = {"Electrical Generation", ""},
['bf'] = {"Electromagnetic Pulse", ""},
['bg'] = {"Flaming Ray", ""},
['bh'] = {"Chimera", ""},
['bi'] = {"Chimera", ""},
['bj'] = {"Chimera", ""},
['bk'] = {"Chimera", ""},
['bl'] = {"Chimera", ""},
['bm'] = {"Chimera", ""},
['bn'] = {"Chimera", ""},
['bo'] = {"Chimera", ""},
['bp'] = {"Chimera", ""},
['bq'] = {"Chimera", ""},
['br'] = {"Chimera", ""},
['bs'] = {"Chimera", ""},
['bt'] = {"Chimera", ""},
['bu'] = {"Chimera", ""},
['bv'] = {"Chimera", ""},
['bw'] = {"Chimera", ""},
['bx'] = {"Chimera", ""},
['by'] = {"Chimera", ""},
['bz'] = {"Chimera", ""},
['b1'] = {"Chimera", ""},
['b2'] = {"Chimera", ""},
['b3'] = {"Chimera", ""},
['b4'] = {"Chimera", ""},
['b5'] = {"Chimera", ""},
['ca'] = {"Chimera", ""},
['cb'] = {"Chimera", ""},
['cc'] = {"Chimera", ""},
['cd'] = {"Beak", ""},
['ce'] = {"Chimera", ""},
['cb'] = {"Chimera", ""},
['u2'] = {"Unstable Genome(2)", ""},
['u2'] = {"Unstable Genome(2)", ""},
['u3'] = {"Unstable Genome(3)", ""},
['u3'] = {"Unstable Genome(3)", ""},
Line 73: Line 112:


function getMutCodes()
function getMutCodes()
local mutresult = cargo.query('Mutations', '_pageName=Name, CreationCode, Variants, Type',
return extTable
  {where='CreationCode <> ""',
default=nil,
orderBy='CreationCode ASC'} )
--[If there was no result, search by alias instead]
if not next(mutresult) then
error('There was no defined mutation table, or it wasn\'t found.')
else
-- Next, reorganize the table so it's [code] = {other, fields}
mutresulttable = {}
    for _,j in ipairs(mutresult) do
    mutresulttable[j['CreationCode']] = {j['Name'], textutil.split(j['Variants']), j['Type'] }
    end
    -- Add unstable genome stacks because they're not stored
    mutresulttable['u2'] = {"Unstable Genome(2)", "", "Genotype"}
        mutresulttable['u3'] = {"Unstable Genome(3)", "", "Genotype"}
        mutresulttable['u4'] = {"Unstable Genome(4)", "", "Genotype"}
        mutresulttable['u5'] = {"Unstable Genome(5)", "", "Genotype"}
        mutresulttable['u6'] = {"Unstable Genome(6)", "", "Genotype"}
        mutresulttable['u7'] = {"Unstable Genome(7)", "", "Genotype"}
        mutresulttable['u8'] = {"Unstable Genome(8)", "", "Genotype"}
        mutresulttable['u9'] = {"Unstable Genome(9)", "", "Genotype"}
    return mutresulttable
    end
end
end


Navigation menu