-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
components/match2/commons/starcraft_starcraft2/game_summary_starcraft_ffa.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |