From de65b2b5def1bca4df40fa4fc80d749fbd2b0221 Mon Sep 17 00:00:00 2001 From: Hesketh2 <88981446+Hesketh2@users.noreply.github.com> Date: Wed, 25 Mar 2026 01:56:28 +0700 Subject: [PATCH 1/5] feat(match2) : EVA Implementation --- lua/wikis/eva/MatchSummary.lua | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 lua/wikis/eva/MatchSummary.lua diff --git a/lua/wikis/eva/MatchSummary.lua b/lua/wikis/eva/MatchSummary.lua new file mode 100644 index 00000000000..60911d3df58 --- /dev/null +++ b/lua/wikis/eva/MatchSummary.lua @@ -0,0 +1,46 @@ +--- +-- @Liquipedia +-- page=Module:MatchSummary +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Lua = require('Module:Lua') + +local DisplayHelper = Lua.import('Module:MatchGroup/Display/Helper') +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 Widget +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) + local function makeTeamSection(opponentIndex) + return { + MatchSummaryWidgets.GameWinLossIndicator{winner = game.winner, opponentIndex = opponentIndex}, + DisplayHelper.MapScore(game.opponents[opponentIndex], game.status) + } + end + + return MatchSummaryWidgets.Row{ + classes = {'brkts-popup-body-game'}, + children = WidgetUtil.collect( + MatchSummaryWidgets.GameTeamWrapper{children = makeTeamSection(1)}, + MatchSummaryWidgets.GameCenter{children = DisplayHelper.Map(game)}, + MatchSummaryWidgets.GameTeamWrapper{children = makeTeamSection(2), flipped = true}, + MatchSummaryWidgets.GameComment{children = game.comment} + ) + } +end + +return CustomMatchSummary From c9642e7ef5627301853de8c607b52a3f6d22e026 Mon Sep 17 00:00:00 2001 From: Hesketh2 <88981446+Hesketh2@users.noreply.github.com> Date: Wed, 25 Mar 2026 01:57:49 +0700 Subject: [PATCH 2/5] Create Custom.lua --- lua/wikis/eva/MatchGroup/Input/Custom.lua | 48 +++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 lua/wikis/eva/MatchGroup/Input/Custom.lua diff --git a/lua/wikis/eva/MatchGroup/Input/Custom.lua b/lua/wikis/eva/MatchGroup/Input/Custom.lua new file mode 100644 index 00000000000..e96dce27aa7 --- /dev/null +++ b/lua/wikis/eva/MatchGroup/Input/Custom.lua @@ -0,0 +1,48 @@ +--- +-- @Liquipedia +-- page=Module:MatchGroup/Input/Custom +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Lua = require('Module:Lua') + +local Array = Lua.import('Module:Array') +local FnUtil = Lua.import('Module:FnUtil') +local Operator = Lua.import('Module:Operator') + +local MatchGroupInputUtil = Lua.import('Module:MatchGroup/Input/Util') + +local CustomMatchGroupInput = {} + +---@class EvaMatchParser: MatchParserInterface +local MatchFunctions = { + DEFAULT_MODE = 'team', + getBestOf = MatchGroupInputUtil.getBestOf, +} + +---@class EvaMapParser: MapParserInterface +local MapFunctions = {} + +---@param match table +---@param options table? +---@return table +function CustomMatchGroupInput.processMatch(match, options) + return MatchGroupInputUtil.standardProcessMatch(match, MatchFunctions) +end + +-- "Normal" match +---@param match table +---@param opponents MGIParsedOpponent[] +---@return table[] +function MatchFunctions.extractMaps(match, opponents) + return MatchGroupInputUtil.standardProcessMaps(match, opponents, MapFunctions) +end + +---@param maps table[] +---@return fun(opponentIndex: integer): integer? +function MatchFunctions.calculateMatchScore(maps) + return FnUtil.curry(MatchGroupInputUtil.computeMatchScoreFromMapWinners, maps) +end + +return CustomMatchGroupInput From bd764b0719174db93b5d7ab4c70d56dc3f5520b4 Mon Sep 17 00:00:00 2001 From: Hesketh2 <88981446+Hesketh2@users.noreply.github.com> Date: Wed, 25 Mar 2026 02:00:30 +0700 Subject: [PATCH 3/5] Create wiki.lua --- lua/wikis/eva/GetMatchGroupCopyPaste/wiki.lua | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 lua/wikis/eva/GetMatchGroupCopyPaste/wiki.lua diff --git a/lua/wikis/eva/GetMatchGroupCopyPaste/wiki.lua b/lua/wikis/eva/GetMatchGroupCopyPaste/wiki.lua new file mode 100644 index 00000000000..17a91efb93d --- /dev/null +++ b/lua/wikis/eva/GetMatchGroupCopyPaste/wiki.lua @@ -0,0 +1,49 @@ +--- +-- @Liquipedia +-- page=Module:GetMatchGroupCopyPaste/wiki +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Lua = require('Module:Lua') + +local Array = Lua.import('Module:Array') +local Class = Lua.import('Module:Class') +local Logic = Lua.import('Module:Logic') + +local BaseCopyPaste = Lua.import('Module:GetMatchGroupCopyPaste/wiki/Base') + +---@class EvaMatch2CopyPaste: Match2CopyPasteBase +local WikiCopyPaste = Class.new(BaseCopyPaste) + +local INDENT = WikiCopyPaste.Indent + +--returns the Code for a Match, depending on the input +---@param bestof integer +---@param mode string +---@param index integer +---@param opponents integer +---@param args table +---@return string +function WikiCopyPaste.getMatchCode(bestof, mode, index, opponents, args) + local showScore = bestof == 0 + local opponent = WikiCopyPaste.getOpponent(mode, showScore) + + local lines = Array.extendWith({}, + '{{Match', + showScore and (INDENT .. '|finished=') or nil, + INDENT .. '|date=', + Logic.readBool(args.streams) and (INDENT .. '|twitch=|youtube=|vod=') or nil, + Array.map(Array.range(1, opponents), function(opponentIndex) + return INDENT .. '|opponent' .. opponentIndex .. '=' .. opponent + end), + bestof ~= 0 and Array.map(Array.range(1, bestof), function(mapIndex) + return INDENT .. '|map' .. mapIndex .. '={{Map|map=|score1=|score2=|winner=}}' + end) or nil, + INDENT .. '}}' + ) + + return table.concat(lines, '\n') +end + +return WikiCopyPaste From 7e5c4426e75caaa275c4b3add9b6c2068b6f59f6 Mon Sep 17 00:00:00 2001 From: Hesketh2 <88981446+Hesketh2@users.noreply.github.com> Date: Wed, 25 Mar 2026 02:04:24 +0700 Subject: [PATCH 4/5] Add support for Map Veto display --- lua/wikis/eva/MatchGroup/Input/Custom.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/wikis/eva/MatchGroup/Input/Custom.lua b/lua/wikis/eva/MatchGroup/Input/Custom.lua index e96dce27aa7..0972b42fdde 100644 --- a/lua/wikis/eva/MatchGroup/Input/Custom.lua +++ b/lua/wikis/eva/MatchGroup/Input/Custom.lua @@ -45,4 +45,12 @@ function MatchFunctions.calculateMatchScore(maps) return FnUtil.curry(MatchGroupInputUtil.computeMatchScoreFromMapWinners, maps) end +---@param match table +---@return table +function MatchFunctions.getExtraData(match) + return { + mapveto = MatchGroupInputUtil.getMapVeto(match), + } +end + return CustomMatchGroupInput From 17b10cd1651f304a824b144bf62b3a6c7f1aa64d Mon Sep 17 00:00:00 2001 From: Hesketh2 <88981446+Hesketh2@users.noreply.github.com> Date: Wed, 25 Mar 2026 02:06:46 +0700 Subject: [PATCH 5/5] Update Custom.lua --- lua/wikis/eva/MatchGroup/Input/Custom.lua | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lua/wikis/eva/MatchGroup/Input/Custom.lua b/lua/wikis/eva/MatchGroup/Input/Custom.lua index 0972b42fdde..613739bb7d1 100644 --- a/lua/wikis/eva/MatchGroup/Input/Custom.lua +++ b/lua/wikis/eva/MatchGroup/Input/Custom.lua @@ -6,13 +6,8 @@ -- local Lua = require('Module:Lua') - -local Array = Lua.import('Module:Array') local FnUtil = Lua.import('Module:FnUtil') -local Operator = Lua.import('Module:Operator') - local MatchGroupInputUtil = Lua.import('Module:MatchGroup/Input/Util') - local CustomMatchGroupInput = {} ---@class EvaMatchParser: MatchParserInterface