Module:TeamResults

local util_args = require('Module:ArgsUtil') local util_cargo = require('Module:CargoUtil') local util_esports = require('Module:EsportsUtil') local util_html = require('Module:HtmlUtil') local util_map = require('Module:MapUtil') local util_table = require('Module:TableUtil') local util_text = require('Module:TextUtil') local util_toggle = require('Module:ToggleUtil') local util_tournament = require('Module:TournamentUtil') local util_vars = require('Module:VarsUtil') local i18n = require('Module:i18nUtil') local m_team = require('Module:Team') local lang = mw.getLanguage('en')

local Results = require('Module:TeamResultsAbstract'):extends

function Results:init self:super('init', 'Team') self.limitOverviewpage = 10 self.limitEverything = 500 self.COLUMNS = { 'Game', 'Date', 'PlaceDisplay', 'PrizeDisplay', 'Tournament', 'Roster' } end

local p = {}

function p.main(frame) local args = util_args.merge return Results:run(args) end

function Results:getSubject(args) return args[1] and m_team.teamlinkname(args[1]) or mw.title.getCurrentTitle.baseText end

function Results:getSubjectWhereCondition(args, subject) return ('Res.Team="%s"'):format(subject) end

function Results:getTypeWhereCondition(args) if args.type then return ('T.EventType="%s"'):format(args.type) end end

return p