Module:CryptogullJr/Codes: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
 
Line 1: Line 1:
local p = {}
local p = {}
local cargo = mw.ext.cargo
local textutil = require'Module:Text Utility'
     --[1 NAME, stats (2 STR, 3 AGI, 4 TUF, 5 INT, 6 WIL, 7 EGO),]--
     --[1 NAME, stats (2 STR, 3 AGI, 4 TUF, 5 INT, 6 WIL, 7 EGO),]--
     --[8 Skills, Resist(9 ACID, 10 ELEC, 11 COLD, 12 HEAT, 13 BLEED), 14 bonusstart]--
     --[8 Skills, Resist(9 ACID, 10 ELEC, 11 COLD, 12 HEAT, 13 BLEED), 14 bonusstart]--
Line 49: Line 46:
}
}


extTable = {
muts = {
['aa'] = {"Chimera", ""},
    ['aa'] = {"Chimera", ""},
['ab'] = {"Esper", ""},
    ['ab'] = {"Esper", ""},
['uu'] = {"Unstable Genome", ""},
    ['uu'] = {"Unstable Genome", ""},
['ba'] = {"Adrenal Control", ""},
    ['ba'] = {"Adrenal Control", ""},
['bb'] = {"Burrowing Claws", ""},
    ['bb'] = {"Burrowing Claws", ""},
['bc'] = {"Corrosive Gas Generation", ""},
    ['bc'] = {"Carapace", ""},
['bd'] = {"Double-muscled", ""},
    ['bd'] = {"Corrosive Gas Generation", ""},
['be'] = {"Electrical Generation", ""},
    ['be'] = {"Double-muscled", ""},
['bf'] = {"Electromagnetic Pulse", ""},
    ['bf'] = {"Electrical Generation", ""},
['bg'] = {"Flaming Ray", ""},
    ['bg'] = {"Electromagnetic Pulse", ""},
['bh'] = {"Chimera", ""},
    ['bh'] = {"Flaming Ray", ""},
['bi'] = {"Chimera", ""},
    ['bi'] = {"Freezing Ray", ""},
['bj'] = {"Chimera", ""},
    ['bj'] = {"Heightened Hearing", ""},
['bk'] = {"Chimera", ""},
    ['bk'] = {"Heightened Quickness", ""},
['bl'] = {"Chimera", ""},
    ['bl'] = {"Horns", ""},
['bm'] = {"Chimera", ""},
    ['bm'] = {"Metamorphosis", ""},
['bn'] = {"Chimera", ""},
    ['bn'] = {"Multiple Arms", ""},
['bo'] = {"Chimera", ""},
    ['bo'] = {"Multiple Legs", ""},
['bp'] = {"Chimera", ""},
    ['bp'] = {"Night Vision", ""},
['bq'] = {"Chimera", ""},
    ['bq'] = {"Phasing", ""},
['br'] = {"Chimera", ""},
    ['br'] = {"Photosynthetic Skin", ""},
['bs'] = {"Chimera", ""},
    ['bs'] = {"Quills", ""},
['bt'] = {"Chimera", ""},
    ['bt'] = {"Regeneration", ""},
['bu'] = {"Chimera", ""},
    ['bu'] = {"Sleep Gas Generation", ""},
['bv'] = {"Chimera", ""},
    ['bv'] = {"Slime Glands", ""},
['bw'] = {"Chimera", ""},
    ['bw'] = {"Spinnerets", ""},
['bx'] = {"Chimera", ""},
    ['bx'] = {"Stinger (Confusing Venom)", ""},
['by'] = {"Chimera", ""},
    ['by'] = {"Stinger (Paralyzing Venom)", ""},
['bz'] = {"Chimera", ""},
    ['bz'] = {"Stinger (Poisoning Venom)", ""},
['b1'] = {"Chimera", ""},
    ['b1'] = {"Thick Fur", ""},
['b2'] = {"Chimera", ""},
    ['b2'] = {"Triple-jointed", ""},
['b3'] = {"Chimera", ""},
    ['b3'] = {"Two-headed", ""},
['b4'] = {"Chimera", ""},
    ['b4'] = {"Two-hearted", ""},
['b5'] = {"Chimera", ""},
    ['b5'] = {"Wings", ""},
['ca'] = {"Chimera", ""},
    ['b6'] = {"Carnivorous", ""},
['cb'] = {"Chimera", ""},
    ['ca'] = {"Albino", ""},
['cc'] = {"Chimera", ""},
    ['cb'] = {"Amphibious", ""},
['cd'] = {"Beak", ""},
    ['cc'] = {"Nerve Poppy", ""},
['ce'] = {"Chimera", ""},
    ['cd'] = {"Beak", ""},
['cb'] = {"Chimera", ""},
    ['ce'] = {"Cold Blooded", ""},
['u2'] = {"Unstable Genome(2)", ""},
    ['cf'] = {"Brittle Bones", ""},
['u3'] = {"Unstable Genome(3)", ""},
    ['cf'] = {"Electromagnetic Impulse", ""},
['u4'] = {"Unstable Genome(4)", ""},
    ['ch'] = {"Hemophilia", ""},
['u5'] = {"Unstable Genome(5)", ""},
    ['ci'] = {"Hooks for Feet", ""},
['u6'] = {"Unstable Genome(6)", ""},
    ['cj'] = {"Myopic", ""},
['u7'] = {"Unstable Genome(7)", ""},
    ['ck'] = {"I forgor", ""},
['u8'] = {"Unstable Genome(8)", ""},
    ['cl'] = {"Spontaneous Combustion", ""},
['u9'] = {"Unstable Genome(9)", ""}
    ['cm'] = {"Tonic Allergy", ""},
    ['cn'] = {"Irritable Genome", ""},
    ['da'] = {"Beguiling", ""},
    ['db'] = {"Burgeoning", ""},
    ['dc'] = {"Clairvoyance", ""},
    ['dd'] = {"Confusion", ""},
    ['de'] = {"Cryokinesis", ""},
    ['df'] = {"Domination", ""},
    ['dg'] = {"Disintegration", ""},
    ['dh'] = {"Ego Projection", ""},
    ['di'] = {"Force Bubble", ""},
    ['dj'] = {"Force Wall", ""},
    ['dk'] = {"Kindle", ""},
    ['dl'] = {"Light Manipulation", ""},
    ['dm'] = {"Mass Mind", ""},
    ['dn'] = {"Mental Mirror", ""},
    ['do'] = {"Precognition", ""},
    ['dp'] = {"Psychometry", ""},
    ['dq'] = {"Pyrokinesis", ""},
    ['dr'] = {"Sense Psychic", ""},
    ['ds'] = {"Space-Time Vortex", ""},
    ['dt'] = {"Stunning Force", ""},
    ['du'] = {"Sunder Mind", ""},
    ['dv'] = {"Syphon Vim", ""},
    ['dw'] = {"Telepathy", ""},
    ['dx'] = {"Teleportation", ""},
    ['dy'] = {"Teleport Other", ""},
    ['d1'] = {"Temporal Fugue", ""},
    ['dz'] = {"Time Dilation", ""},
    ['ea'] = {"Amnesia", ""},
    ['eb'] = {"Blinking Tic", ""},
    ['ec'] = {"Evil Twin", ""},
    ['ed'] = {"Narcolepsy", ""},
    ['ee'] = {"??", ""},
    ['ef'] = {"Socially Repugnant", ""},
    ['eg'] = {"Unwelcome Germination", ""},
    ['eh'] = {"Quantum Jitters", ""},
    ['ei'] = {"Dystechnia", ""},
    ['ow'] = {"Psionic Migraines", ""},
    ['u2'] = {"Unstable Genome(2)", ""},
    ['u3'] = {"Unstable Genome(3)", ""},
    ['u4'] = {"Unstable Genome(4)", ""},
    ['u5'] = {"Unstable Genome(5)", ""},
    ['u6'] = {"Unstable Genome(6)", ""},
    ['u7'] = {"Unstable Genome(7)", ""},
    ['u8'] = {"Unstable Genome(8)", ""},
    ['u9'] = {"Unstable Genome(9)", ""},
    ['00'] = {"No Cybernetic", ""},
    ['01'] = {"dermal insulation", ""},
    ['02'] = {"dermal insulation", ""},
    ['03'] = {"dermal insulation", ""},
    ['04'] = {"optical bioscanner", ""},
    ['05'] = {"optical technoscanner", ""},
    ['06'] = {"night vision", ""},
    ['07'] = {"hyper-elastic ankle tendons", ""},
    ['08'] = {"parabolic muscular subroutine", ""},
    ['09'] = {"translucent skin", ""},
    ['10'] = {"translucent skin", ""},
    ['11'] = {"stabilizer arm locks", ""},
    ['12'] = {"rapid release finger flexors", ""},
    ['13'] = {"carbide hand bones", ""},
    ['14'] = {"pentaceps", ""},
    ['15'] = {"inflatable axons", ""}
}
}
function p.mergeCodes(muttable, cybtable)
    finaltable = muttable
    for k,v in pairs(cybtable) do
    if finaltable[k] then
    error("there are cybernetics and mutations that have the same creation code!")
    end
    finaltable[k] = v
    end
    return finaltable
end
function getMutCodes()
return extTable
end
function getCyberneticsCodes()
local cyberneticresult = cargo.query('Cybernetics',
'Name, CreationCode, StartingCybernetic',
  {where='CreationCode <> ""',
default=nil,
orderBy='CreationCode ASC'} )
--[If there was no result, search by alias instead]
if not next(cyberneticresult) then
error('There was no defined cybernetic table, or it wasn\'t found.')
else
-- Next, reorganize the table so it's [code] = {other, fields}
cyberneticresulttable = {}
arcologycybertable = {}
    for _,j in ipairs(cyberneticresult) do
    if j['CreationCode'] ~= "16" then -- no 16 variants
    cyberneticresulttable[j['CreationCode']] = {j['Name'], j['StartingCybernetic']}
    end
    end
    -- add no cybernetic because its not stored
    cyberneticresulttable['00'] = {"No Cybernetic", "", ""}
    return cyberneticresulttable
    end
end
muts = p.mergeCodes(getMutCodes(), getCyberneticsCodes())




Navigation menu