contributors, delete_pages, Interface administrators
4,701
edits
FaeriMagic (talk | contribs) mNo edit summary |
FaeriMagic (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local | function p.main(frame) | ||
local args = frame:getParent().args | |||
local skill = args.skill or "Unnamed Skill" | |||
local img = args.img or "Placeholder.png" | |||
local typeName = args.type or "Fellow" | |||
local levels = args.levels or "" | |||
local rows = {} | local rows = {} | ||
for line in mw.text.gsplit( | for line in mw.text.gsplit(levels, ";", true) do | ||
local parts = mw.text.split(mw.text.trim(line), ",") | local parts = mw.text.split(mw.text.trim(line), ",") | ||
local level = parts[1] or "" | local level = parts[1] or "" | ||
Line 21: | Line 27: | ||
! Level Cap | ! Level Cap | ||
! <abbr title="The Aptitude multiplier granted by this costume.">%s Aptitude</abbr> | ! <abbr title="The Aptitude multiplier granted by this costume.">%s Aptitude</abbr> | ||
]=], img | ]=], img, skill, typeName) | ||
return header .. "\n" .. table.concat(rows, "\n") .. "\n|}" | return header .. "\n" .. table.concat(rows, "\n") .. "\n|}" | ||
end | end | ||
return p | return p |