diff --git a/components/match2/commons/starcraft_starcraft2/game_summary_starcraft_ffa.lua b/components/match2/commons/starcraft_starcraft2/game_summary_starcraft_ffa.lua new file mode 100644 index 0000000000..3d8c7a45b7 --- /dev/null +++ b/components/match2/commons/starcraft_starcraft2/game_summary_starcraft_ffa.lua @@ -0,0 +1,40 @@ +--- +-- @Liquipedia +-- wiki=commons +-- page=Module:GameSummary/Starcraft/FFa +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local CustomGameSummary = {} + +local Lua = require('Module:Lua') + +local MatchGroupUtil = Lua.import('Module:MatchGroup/Util/Starcraft') + +local SummaryHelper = Lua.import('Module:MatchSummary/Base/Ffa') +local MatchSummaryWidgets = Lua.import('Module:Widget/Match/Summary/Ffa/All') + +---@param props {bracketId: string, matchId: string, gameIdx: integer} +---@return Html +function CustomGameSummary.getGameByMatchId(props) + local match = MatchGroupUtil.fetchMatchForBracketDisplay(props.bracketId, props.matchId) + + local game = match.games[props.gameIdx] + assert(game, 'Error Game ID ' .. tostring(props.gameIdx) .. ' not found') + + game.stream = match.stream + + SummaryHelper.updateGameOpponents(game, match.opponents) + + return MatchSummaryWidgets.Tab{ + matchId = match.matchId, + idx = props.gameIdx, + children = { + MatchSummaryWidgets.GameDetails{game = game}, + SummaryHelper.standardGame(game) + } + } +end + +return CustomGameSummary diff --git a/components/match2/wikis/starcraft/game_summary.lua b/components/match2/wikis/starcraft/game_summary.lua new file mode 100644 index 0000000000..4cc8ad3b88 --- /dev/null +++ b/components/match2/wikis/starcraft/game_summary.lua @@ -0,0 +1,13 @@ +--- +-- @Liquipedia +-- wiki=starcraft +-- page=Module:GameSummary +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Lua = require('Module:Lua') + +local StarcraftFfaGameSummary = Lua.import('Module:GameSummary/Starcraft/FFa') + +return StarcraftFfaGameSummary diff --git a/components/match2/wikis/starcraft2/game_summary.lua b/components/match2/wikis/starcraft2/game_summary.lua new file mode 100644 index 0000000000..b583816db7 --- /dev/null +++ b/components/match2/wikis/starcraft2/game_summary.lua @@ -0,0 +1,13 @@ +--- +-- @Liquipedia +-- wiki=starcraft2 +-- page=Module:GameSummary +-- +-- Please see https://github.com/Liquipedia/Lua-Modules to contribute +-- + +local Lua = require('Module:Lua') + +local StarcraftFfaGameSummary = Lua.import('Module:GameSummary/Starcraft/FFa') + +return StarcraftFfaGameSummary