-
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
1 parent
954dc8f
commit b787bc6
Showing
2 changed files
with
91 additions
and
15 deletions.
There are no files selected for viewing
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
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,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 |