diff --git a/components/match2/wikis/halo/match_group_input_custom.lua b/components/match2/wikis/halo/match_group_input_custom.lua index c382b6c5257..6353ba49b81 100644 --- a/components/match2/wikis/halo/match_group_input_custom.lua +++ b/components/match2/wikis/halo/match_group_input_custom.lua @@ -170,6 +170,8 @@ end function MapFunctions.getExtraData(map, opponentCount) return { comment = map.comment, + points1 = map.points1, + points2 = map.points2, } end diff --git a/components/match2/wikis/halo/match_summary.lua b/components/match2/wikis/halo/match_summary.lua index d1521916fd3..5fb6aacf24a 100644 --- a/components/match2/wikis/halo/match_summary.lua +++ b/components/match2/wikis/halo/match_summary.lua @@ -144,14 +144,33 @@ function CustomMatchSummary._createMapRow(game) centerNode:addClass('brkts-popup-spaced-map-skip') end + local displayScore = function(opponentIndex) + local score = DisplayHelper.MapScore( + game.scores[opponentIndex], + opponentIndex, + game.resultType, + game.walkover, + game.winner + ) + local points = game.extradata['points' .. opponentIndex] + if not points then + return score + end + local flipped = opponentIndex == 2 + if flipped then + return '(' .. points .. ') ' .. score + end + return score .. ' (' .. points .. ')' + end + local leftNode = mw.html.create('div') :addClass('brkts-popup-spaced') :node(CustomMatchSummary._addCheckmark(game.winner == 1)) - :node(DisplayHelper.MapScore(game.scores[1], 1, game.resultType, game.walkover, game.winner)) + :node(displayScore(1)) local rightNode = mw.html.create('div') :addClass('brkts-popup-spaced') - :node(DisplayHelper.MapScore(game.scores[2], 2, game.resultType, game.walkover, game.winner)) + :node(displayScore(2)) :node(CustomMatchSummary._addCheckmark(game.winner == 2)) row:addElement(leftNode)