diff --git a/lua/spec/snapshots/LeagueIcon.generate_copy_paste_gen.png b/lua/spec/snapshots/LeagueIcon.generate_copy_paste_gen.png index 63d5261e5aa..4c20f47b97e 100644 Binary files a/lua/spec/snapshots/LeagueIcon.generate_copy_paste_gen.png and b/lua/spec/snapshots/LeagueIcon.generate_copy_paste_gen.png differ diff --git a/lua/spec/snapshots/Slider.png b/lua/spec/snapshots/Slider.png index a42d2ee5df4..37491c62b57 100644 Binary files a/lua/spec/snapshots/Slider.png and b/lua/spec/snapshots/Slider.png differ diff --git a/lua/spec/snapshots/date range display.png b/lua/spec/snapshots/date range display.png index c43140c286a..d88082d1f0a 100644 Binary files a/lua/spec/snapshots/date range display.png and b/lua/spec/snapshots/date range display.png differ diff --git a/lua/spec/snapshots/dota2 rankings.png b/lua/spec/snapshots/dota2 rankings.png index 9f13ca2cea6..fa3b614f4bf 100644 Binary files a/lua/spec/snapshots/dota2 rankings.png and b/lua/spec/snapshots/dota2 rankings.png differ diff --git a/lua/spec/snapshots/infobox_league_apexlegends.png b/lua/spec/snapshots/infobox_league_apexlegends.png index 3506fdc1daf..233f01a9aeb 100644 Binary files a/lua/spec/snapshots/infobox_league_apexlegends.png and b/lua/spec/snapshots/infobox_league_apexlegends.png differ diff --git a/lua/spec/snapshots/infobox_league_counterstrike.png b/lua/spec/snapshots/infobox_league_counterstrike.png index c277cb4c138..0341ac21dd6 100644 Binary files a/lua/spec/snapshots/infobox_league_counterstrike.png and b/lua/spec/snapshots/infobox_league_counterstrike.png differ diff --git a/lua/spec/snapshots/infobox_league_dota2.png b/lua/spec/snapshots/infobox_league_dota2.png index 20d0704ca69..5bc43aff940 100644 Binary files a/lua/spec/snapshots/infobox_league_dota2.png and b/lua/spec/snapshots/infobox_league_dota2.png differ diff --git a/lua/spec/snapshots/infobox_league_leagueoflegends.png b/lua/spec/snapshots/infobox_league_leagueoflegends.png index c277cb4c138..0341ac21dd6 100644 Binary files a/lua/spec/snapshots/infobox_league_leagueoflegends.png and b/lua/spec/snapshots/infobox_league_leagueoflegends.png differ diff --git a/lua/spec/snapshots/infobox_league_mobilelegends.png b/lua/spec/snapshots/infobox_league_mobilelegends.png index c277cb4c138..0341ac21dd6 100644 Binary files a/lua/spec/snapshots/infobox_league_mobilelegends.png and b/lua/spec/snapshots/infobox_league_mobilelegends.png differ diff --git a/lua/spec/snapshots/infobox_league_overwatch.png b/lua/spec/snapshots/infobox_league_overwatch.png index 7d9739e5c02..5f4f4242ddd 100644 Binary files a/lua/spec/snapshots/infobox_league_overwatch.png and b/lua/spec/snapshots/infobox_league_overwatch.png differ diff --git a/lua/spec/snapshots/infobox_league_rainbowsix.png b/lua/spec/snapshots/infobox_league_rainbowsix.png index c1a13e78f25..00bbe611b18 100644 Binary files a/lua/spec/snapshots/infobox_league_rainbowsix.png and b/lua/spec/snapshots/infobox_league_rainbowsix.png differ diff --git a/lua/spec/snapshots/infobox_league_rocketleague.png b/lua/spec/snapshots/infobox_league_rocketleague.png index c277cb4c138..0341ac21dd6 100644 Binary files a/lua/spec/snapshots/infobox_league_rocketleague.png and b/lua/spec/snapshots/infobox_league_rocketleague.png differ diff --git a/lua/spec/snapshots/infobox_league_starcraft2.png b/lua/spec/snapshots/infobox_league_starcraft2.png index d41cc85c6c7..365beb690b6 100644 Binary files a/lua/spec/snapshots/infobox_league_starcraft2.png and b/lua/spec/snapshots/infobox_league_starcraft2.png differ diff --git a/lua/spec/snapshots/infobox_league_valorant.png b/lua/spec/snapshots/infobox_league_valorant.png index c277cb4c138..0341ac21dd6 100644 Binary files a/lua/spec/snapshots/infobox_league_valorant.png and b/lua/spec/snapshots/infobox_league_valorant.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_apexlegends.png b/lua/spec/snapshots/match2_matchlist_smoke_apexlegends.png index 426e0f4a4b9..89e1daa1021 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_apexlegends.png and b/lua/spec/snapshots/match2_matchlist_smoke_apexlegends.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_counterstrike.png b/lua/spec/snapshots/match2_matchlist_smoke_counterstrike.png index 2d68aeda2ce..12cd3c3c1a2 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_counterstrike.png and b/lua/spec/snapshots/match2_matchlist_smoke_counterstrike.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_dota2.png b/lua/spec/snapshots/match2_matchlist_smoke_dota2.png index 2d68aeda2ce..12cd3c3c1a2 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_dota2.png and b/lua/spec/snapshots/match2_matchlist_smoke_dota2.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_leagueoflegends.png b/lua/spec/snapshots/match2_matchlist_smoke_leagueoflegends.png index 2d68aeda2ce..12cd3c3c1a2 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_leagueoflegends.png and b/lua/spec/snapshots/match2_matchlist_smoke_leagueoflegends.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_mobilelegends.png b/lua/spec/snapshots/match2_matchlist_smoke_mobilelegends.png index 2d68aeda2ce..12cd3c3c1a2 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_mobilelegends.png and b/lua/spec/snapshots/match2_matchlist_smoke_mobilelegends.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_overwatch.png b/lua/spec/snapshots/match2_matchlist_smoke_overwatch.png index 2d68aeda2ce..12cd3c3c1a2 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_overwatch.png and b/lua/spec/snapshots/match2_matchlist_smoke_overwatch.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_rainbowsix.png b/lua/spec/snapshots/match2_matchlist_smoke_rainbowsix.png index 2d68aeda2ce..12cd3c3c1a2 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_rainbowsix.png and b/lua/spec/snapshots/match2_matchlist_smoke_rainbowsix.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_rocketleague.png b/lua/spec/snapshots/match2_matchlist_smoke_rocketleague.png index 2d68aeda2ce..12cd3c3c1a2 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_rocketleague.png and b/lua/spec/snapshots/match2_matchlist_smoke_rocketleague.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_starcraft2.png b/lua/spec/snapshots/match2_matchlist_smoke_starcraft2.png index 2d68aeda2ce..12cd3c3c1a2 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_starcraft2.png and b/lua/spec/snapshots/match2_matchlist_smoke_starcraft2.png differ diff --git a/lua/spec/snapshots/match2_matchlist_smoke_valorant.png b/lua/spec/snapshots/match2_matchlist_smoke_valorant.png index 2d68aeda2ce..12cd3c3c1a2 100644 Binary files a/lua/spec/snapshots/match2_matchlist_smoke_valorant.png and b/lua/spec/snapshots/match2_matchlist_smoke_valorant.png differ diff --git a/lua/spec/snapshots/prize_pool.png b/lua/spec/snapshots/prize_pool.png index 51a667dff85..74dcd66d32d 100644 Binary files a/lua/spec/snapshots/prize_pool.png and b/lua/spec/snapshots/prize_pool.png differ diff --git a/lua/spec/snapshots/squad_row_apexlegends.png b/lua/spec/snapshots/squad_row_apexlegends.png index 25c9edada21..e5b14a4413a 100644 Binary files a/lua/spec/snapshots/squad_row_apexlegends.png and b/lua/spec/snapshots/squad_row_apexlegends.png differ diff --git a/lua/spec/snapshots/squad_row_counterstrike.png b/lua/spec/snapshots/squad_row_counterstrike.png index 25c9edada21..e5b14a4413a 100644 Binary files a/lua/spec/snapshots/squad_row_counterstrike.png and b/lua/spec/snapshots/squad_row_counterstrike.png differ diff --git a/lua/spec/snapshots/squad_row_dota2.png b/lua/spec/snapshots/squad_row_dota2.png index f9ca0b1f363..46c37c5a3bd 100644 Binary files a/lua/spec/snapshots/squad_row_dota2.png and b/lua/spec/snapshots/squad_row_dota2.png differ diff --git a/lua/spec/snapshots/squad_row_leagueoflegends.png b/lua/spec/snapshots/squad_row_leagueoflegends.png index 6c6561b95eb..e5b14a4413a 100644 Binary files a/lua/spec/snapshots/squad_row_leagueoflegends.png and b/lua/spec/snapshots/squad_row_leagueoflegends.png differ diff --git a/lua/spec/snapshots/squad_row_mobilelegends.png b/lua/spec/snapshots/squad_row_mobilelegends.png index 6c6561b95eb..e5b14a4413a 100644 Binary files a/lua/spec/snapshots/squad_row_mobilelegends.png and b/lua/spec/snapshots/squad_row_mobilelegends.png differ diff --git a/lua/spec/snapshots/squad_row_overwatch.png b/lua/spec/snapshots/squad_row_overwatch.png index ea576c31081..215461ab009 100644 Binary files a/lua/spec/snapshots/squad_row_overwatch.png and b/lua/spec/snapshots/squad_row_overwatch.png differ diff --git a/lua/spec/snapshots/squad_row_rocketleague.png b/lua/spec/snapshots/squad_row_rocketleague.png index 25c9edada21..e5b14a4413a 100644 Binary files a/lua/spec/snapshots/squad_row_rocketleague.png and b/lua/spec/snapshots/squad_row_rocketleague.png differ diff --git a/lua/spec/snapshots/squad_row_starcraft2.png b/lua/spec/snapshots/squad_row_starcraft2.png index 25c9edada21..e5b14a4413a 100644 Binary files a/lua/spec/snapshots/squad_row_starcraft2.png and b/lua/spec/snapshots/squad_row_starcraft2.png differ diff --git a/lua/spec/snapshots/squad_row_valorant.png b/lua/spec/snapshots/squad_row_valorant.png index 25c9edada21..e5b14a4413a 100644 Binary files a/lua/spec/snapshots/squad_row_valorant.png and b/lua/spec/snapshots/squad_row_valorant.png differ diff --git a/lua/spec/snapshots/tabs_dynamic_variants.png b/lua/spec/snapshots/tabs_dynamic_variants.png index caa6a9c47a4..364d7b94833 100644 Binary files a/lua/spec/snapshots/tabs_dynamic_variants.png and b/lua/spec/snapshots/tabs_dynamic_variants.png differ diff --git a/lua/spec/snapshots/team_participant.png b/lua/spec/snapshots/team_participant.png index 226f0f4d85d..f9fa1d1d665 100644 Binary files a/lua/spec/snapshots/team_participant.png and b/lua/spec/snapshots/team_participant.png differ diff --git a/lua/spec/snapshots/transfer_row_apexlegends.png b/lua/spec/snapshots/transfer_row_apexlegends.png index 7a4ff8efb4c..dcb0ad80dff 100644 Binary files a/lua/spec/snapshots/transfer_row_apexlegends.png and b/lua/spec/snapshots/transfer_row_apexlegends.png differ diff --git a/lua/spec/snapshots/transfer_row_counterstrike.png b/lua/spec/snapshots/transfer_row_counterstrike.png index 7a4ff8efb4c..dcb0ad80dff 100644 Binary files a/lua/spec/snapshots/transfer_row_counterstrike.png and b/lua/spec/snapshots/transfer_row_counterstrike.png differ diff --git a/lua/spec/snapshots/transfer_row_dota2.png b/lua/spec/snapshots/transfer_row_dota2.png index 7a4ff8efb4c..dcb0ad80dff 100644 Binary files a/lua/spec/snapshots/transfer_row_dota2.png and b/lua/spec/snapshots/transfer_row_dota2.png differ diff --git a/lua/spec/snapshots/transfer_row_leagueoflegends.png b/lua/spec/snapshots/transfer_row_leagueoflegends.png index 4200e05eb0d..725d6bd6dfb 100644 Binary files a/lua/spec/snapshots/transfer_row_leagueoflegends.png and b/lua/spec/snapshots/transfer_row_leagueoflegends.png differ diff --git a/lua/spec/snapshots/transfer_row_mobilelegends.png b/lua/spec/snapshots/transfer_row_mobilelegends.png index 4200e05eb0d..725d6bd6dfb 100644 Binary files a/lua/spec/snapshots/transfer_row_mobilelegends.png and b/lua/spec/snapshots/transfer_row_mobilelegends.png differ diff --git a/lua/spec/snapshots/transfer_row_overwatch.png b/lua/spec/snapshots/transfer_row_overwatch.png index 7a4ff8efb4c..dcb0ad80dff 100644 Binary files a/lua/spec/snapshots/transfer_row_overwatch.png and b/lua/spec/snapshots/transfer_row_overwatch.png differ diff --git a/lua/spec/snapshots/transfer_row_rainbowsix.png b/lua/spec/snapshots/transfer_row_rainbowsix.png index 7a4ff8efb4c..dcb0ad80dff 100644 Binary files a/lua/spec/snapshots/transfer_row_rainbowsix.png and b/lua/spec/snapshots/transfer_row_rainbowsix.png differ diff --git a/lua/spec/snapshots/transfer_row_rocketleague.png b/lua/spec/snapshots/transfer_row_rocketleague.png index 4200e05eb0d..725d6bd6dfb 100644 Binary files a/lua/spec/snapshots/transfer_row_rocketleague.png and b/lua/spec/snapshots/transfer_row_rocketleague.png differ diff --git a/lua/spec/snapshots/transfer_row_starcraft2.png b/lua/spec/snapshots/transfer_row_starcraft2.png index 4a5577208b0..e5ab23fa7fc 100644 Binary files a/lua/spec/snapshots/transfer_row_starcraft2.png and b/lua/spec/snapshots/transfer_row_starcraft2.png differ diff --git a/lua/spec/snapshots/transfer_row_valorant.png b/lua/spec/snapshots/transfer_row_valorant.png index 7a4ff8efb4c..dcb0ad80dff 100644 Binary files a/lua/spec/snapshots/transfer_row_valorant.png and b/lua/spec/snapshots/transfer_row_valorant.png differ 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 diff --git a/lua/wikis/eva/MatchGroup/Input/Custom.lua b/lua/wikis/eva/MatchGroup/Input/Custom.lua new file mode 100644 index 00000000000..49ba5d6832e --- /dev/null +++ b/lua/wikis/eva/MatchGroup/Input/Custom.lua @@ -0,0 +1,52 @@ +--- +-- @Liquipedia +-- page=Module:MatchGroup/Input/Custom +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Lua = require('Module:Lua') + +local FnUtil = Lua.import('Module:FnUtil') +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 + +---@param match table +---@return table +function MatchFunctions.getExtraData(match) + return { + mapveto = MatchGroupInputUtil.getMapVeto(match), + } +end + +return CustomMatchGroupInput 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