Module:Model Type

local p = {}

local lookup = { tf='Tall Female', tm='Tall Male', mf='Medium Female', mm='Medium Male', sf='Short Female', }

function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {		parentFirst = true,		wrapper = { 'Template:Model Type' }	}) return p._main(args) end

function p._main(args) local pagename = args[1] or mw.title.getCurrentTitle.text local nocat = args['nocat'] or false local notext = args['notext'] or false local nolink = args['nolink'] or false local str_out = '' if pagename == 'Traveler' then if not notext then str_out = str_out .. 'Aether: ' end str_out = str_out .. getBodyType('Aether', notext, nolink, nocat) if not notext then str_out = str_out .. ' Lumine: ' end str_out = str_out .. getBodyType('Lumine', notext, nolink, nocat) else str_out = getBodyType(pagename, notext, nolink, nocat) end return str_out end

function getBodyType(name, notext, nolink, nocat) local bid = require('Module:Model Type/data')[name] local btype = lookup[bid] local str_out = '' if btype ~= nil then if not notext then if nolink then str_out = btype else str_out =  .. btype ..  end end if not nocat then str_out = str_out .. require('Module:Namespace detect').main{['main']=''} end end return str_out end

return p