diff --git a/components/match2/wikis/arenafps/match_group_input_custom.lua b/components/match2/wikis/arenafps/match_group_input_custom.lua index 107c8ff668..e36469a3a1 100644 --- a/components/match2/wikis/arenafps/match_group_input_custom.lua +++ b/components/match2/wikis/arenafps/match_group_input_custom.lua @@ -43,14 +43,6 @@ function MatchFunctions.extractMaps(match, opponents) return MatchGroupInputUtil.standardProcessMaps(match, opponents, MapFunctions) end ----@param games table[] ----@return table[] -function MatchFunctions.removeUnsetMaps(games) - return Array.filter(games, function(map) - return map.map ~= nil - end) -end - ---@param bestofInput string|integer? ---@return integer? function MatchFunctions.getBestOf(bestofInput) diff --git a/components/match2/wikis/autochess/match_summary.lua b/components/match2/wikis/autochess/match_summary.lua new file mode 100644 index 0000000000..6753464394 --- /dev/null +++ b/components/match2/wikis/autochess/match_summary.lua @@ -0,0 +1,38 @@ +--- +-- @Liquipedia +-- wiki=autochess +-- page=Module:MatchSummary +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Lua = require('Module:Lua') + +local MatchSummary = Lua.import('Module:MatchSummary/Base') +local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/All') +local WidgetUtil = Lua.import('Module:Widget/Util') + +local CustomMatchSummary = {} + +---@param args table +---@return Html +function CustomMatchSummary.getByMatchId(args) + return MatchSummary.defaultGetByMatchId(CustomMatchSummary, args) +end + +---@param date string +---@param game MatchGroupUtilGame +---@param gameIndex integer +---@return Widget? +function CustomMatchSummary.createGame(date, game, gameIndex) + return MatchSummaryWidgets.Row{ + classes = {'brkts-popup-body-game'}, + children = WidgetUtil.collect( + MatchSummaryWidgets.GameWinLossIndicator{winner = game.winner, opponentIndex = 1}, + MatchSummaryWidgets.GameCenter{children = 'Game ' .. gameIndex}, + MatchSummaryWidgets.GameWinLossIndicator{winner = game.winner, opponentIndex = 2} + ) + } +end + +return CustomMatchSummary