Module:Teamstyles

From SMITE Esports Wiki
Jump to: navigation, search

To edit the documentation or categories for this module, click here.


local p = {} -- teamstyles

--------------------------------------
-- variable names
--------------------------------------

function p.teamname(namevars, settings)
	return namevars.long
end

function p.teammediumname(namevars, settings)
	return namevars.medium
end

function p.teamshortname(namevars, settings)
	return namevars.short
end

function p.teamlinkname(namevars, settings)
	return namevars.link
end

--------------------------------------
-- image
--------------------------------------

function p.onlyimage(namevars, settings)
	local size = settings.size or 60
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return "[[File:" .. logo .. "logo std.png|link=|" .. size .. 'px]]'
end

function p.onlyimagelinked(namevars, settings)
	local size = settings.size or 60
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return "[[File:" .. logo .. "logo std.png|link=" .. namevars.link .. '|' .. size .. 'px]]'
end

function p.squarelinked(namevars, settings)
	local size = settings.size or 60
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return "[[File:" .. logo .. "logo square.png|link=" .. namevars.link .. '|' .. size .. 'px]]'
end
--------------------------------------
-- link only
--------------------------------------

function p.mediumplainlinked(namevars, settings)
	return '[[' .. namevars.link .. '|' .. namevars.medium .. ']]'
end

function p.plainlinked(namevars, settings)
	return '[[' .. namevars.link .. '|' .. namevars.long .. ']]'
end

--------------------------------------
-- text to the right
--------------------------------------

function p.rightshort(namevars, settings)
	local size = settings.size or 38
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return '[[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]] ' .. namevars.short
end

function p.rightmedium(namevars, settings)
	local size = settings.size or 38
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return '[[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]] ' .. namevars.medium
end

function p.rightlong(namevars, settings)
	local size = settings.size or 60
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return '[[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]] ' .. namevars.long
end

function p.rightshortlinked(namevars, settings)
	local size = settings.size or 38
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return '[[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]] [[' .. namevars.link .. '|' .. namevars.short .. ']]'
end

function p.rightmediumlinked(namevars, settings)
	local size = settings.size or 38
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return '[[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]] [[' .. namevars.link .. '|' .. namevars.medium .. ']]'
end

function p.rightlonglinked(namevars, settings)
	local size = settings.size or 60
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return '[[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]] [[' .. namevars.link .. '|' .. namevars.long .. ']]'
end

--------------------------------------
-- text to the left
--------------------------------------

function p.leftshort(namevars, settings)
	local size = settings.size or 38
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return namevars.short .. ' [[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]]'
end

function p.leftmedium(namevars, settings)
	local size = settings.size or 45
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return namevars.short .. ' [[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]]'
end

function p.leftlong(namevars, settings) -- this one is default
	local size = settings.size or 60
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return namevars.short .. ' [[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]]'
end

function p.leftshortlinked(namevars, settings)
	local size = settings.size or 38
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return '[[' .. namevars.link .. '|' .. namevars.short .. ']] [[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]]'
end

function p.leftmediumlinked(namevars, settings)
	local size = settings.size or 45
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return '[[' .. namevars.link .. '|' .. namevars.medium .. ']] [[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]]'
end

function p.leftlonglinked(namevars, settings) -- this one is default
	local size = settings.size or 60
	local logo = settings.logo or namevars.link:gsub("+", " ")
	return '[[' .. namevars.link .. '|' .. namevars.long .. ']] [[File:' .. logo .. 'logo std.png|link=' .. namevars.link .. '|' .. size .. 'px]]'
end

return p