Module:Disassemble

--

local p = {}

function p.main(frame) local args = frame:getParent.args

local components = {}

local level = tonumber(level) or 1

local xp = tonumber(xp) or 1

local _components = mw.text.split(args.components,'%s*,%s')

for _, v in ipairs(_components) do		table.insert(components,v) end

return p._main(components,level,xp) end

function p._main(comp,lvl,xp) local ret = mw.html.create('div') :wikitext('This item can be disassembled with the Inventor skill')

local _t = ret:tag('table') :addClass('wikitable') :tag('tr') :tag('th') :wikitext('Level') :done :tag('td') :wikitext(lvl) :done :done :tag('tr') :tag('th') :wikitext('Experience') :done :tag('td') :wikitext(xp) :done :done :tag('tr') :tag('th') :attr('colspan','2') :wikitext('Possible components') :done :done

for _, v in ipairs(comp) do		_t:tag('tr') :tag('td') :attr('colspan','2') :wikitext(v) :done :done end

return ret end

return p