8,756
edits
mNo edit summary |
mNo edit summary |
||
Line 4: | Line 4: | ||
function p.Main(frame) | function p.Main(frame) | ||
local buildcode = | local buildcode = frame.args[1] | ||
local beta = frame.args['beta'] or '1' | local beta = frame.args['beta'] or '1' | ||
return p.decode(buildcode, beta | return p.decode(buildcode, beta) | ||
end | end | ||
function p.decode(buildcode, beta | function p.decode(buildcode, beta) | ||
local genotype | local genotype | ||
local subtype | local subtype | ||
Line 81: | Line 81: | ||
attributes = p.fixattributes(bonus, attributes) | attributes = p.fixattributes(bonus, attributes) | ||
end | end | ||
output = p.MakeUpSheet(buildcode, genotype, subtype, | |||
classcalled, extname, attributes, bonus, exts) | |||
output = p.MakeUpSheet(buildcode, genotype, subtype, classcalled, extname, attributes, bonus, exts | |||
return output | return output | ||
end | end | ||
Line 148: | Line 146: | ||
end | end | ||
function p.MakeUpSheet(codeIn, genoIn, subtype, classcalledIn, extnameIn, attributes, bonus, | function p.MakeUpSheet(codeIn, genoIn, subtype, classcalledIn, extnameIn, | ||
attributes, bonus, exts) | |||
local frame = mw.getCurrentFrame() | |||
return frame:expandTemplate { | return frame:expandTemplate { | ||
title = 'Crypto result', | title = 'Crypto result', | ||
Line 164: | Line 163: | ||
ego = attributes[6] .. bonus[6], | ego = attributes[6] .. bonus[6], | ||
extname = extnameIn, | extname = extnameIn, | ||
exts = utilTable.concat( | exts = utilTable.concat(exts, "</br>"), | ||
skills = subtype[8], | skills = subtype[8], | ||
notes = subtype[14] | notes = subtype[14] | ||
Line 170: | Line 169: | ||
} | } | ||
end | end | ||
function p.test() | |||
return p.Main({["args"]={"BGMMMKMKBABJBPD1", ["beta"]=1}}) | |||
end | |||
return p | return p |