Leaguepedia | League of Legends Esports Wiki
Advertisement

Edit the documentation or categories for this module.

If you are an editor wanting to update the list of champions, see {{Championnames}}m


local p = {}

function p.champion ( frame )
	local args = frame
	if frame == mw.getCurrentFrame() then
		args = require( 'Module:ProcessArgs' ).merge( true )
	else
		frame = mw.getCurrentFrame()
	end
	
	local Styles = require('Module:Championstyles')
	local Names = mw.loadData( 'Module:Championnames' )
	
	local input = args[1] or ''
	local inputlc = string.lower(input)
	local style = string.lower(args[2] or 'default')
	
	local settings = {
		file = Names[inputlc] or input,
	}
	
	settings.link = args['link'] or settings.file
	settings.display = args['link'] or settings.file
	
	if args.size then
		if string.sub(args.size,-2) == "px" then
			settings.size = string.sub(args.size,1,-3)
		else
			settings.size = args.size
		end
	end
	
	local text = Styles[style](settings)
	
	return text
end

return p
Advertisement