From 6d591cb1dcc6079a82d90e7104070734eb3c2628 Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Thu, 10 Oct 2024 09:58:55 +0200 Subject: [PATCH] do cs, fifa and tft --- .../match2/wikis/counterstrike/match_group_input_custom.lua | 4 +++- .../match2/wikis/easportsfc/match_group_input_custom.lua | 4 +++- components/match2/wikis/tft/match_group_input_custom.lua | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/components/match2/wikis/counterstrike/match_group_input_custom.lua b/components/match2/wikis/counterstrike/match_group_input_custom.lua index 7ea55243ab1..7d9861a6a9c 100644 --- a/components/match2/wikis/counterstrike/match_group_input_custom.lua +++ b/components/match2/wikis/counterstrike/match_group_input_custom.lua @@ -71,7 +71,9 @@ function CustomMatchGroupInput.processMatch(match, options) match.resulttype = MatchGroupInputUtil.getResultType(winnerInput, finishedInput, opponents) match.walkover = MatchGroupInputUtil.getWalkover(match.resulttype, opponents) match.winner = MatchGroupInputUtil.getWinner(match.resulttype, winnerInput, opponents) - MatchGroupInputUtil.setPlacement(opponents, match.winner, 1, 2, match.resulttype) + Array.forEach(opponents, function(opponent, opponentIndex) + opponent.placement = MatchGroupInputUtil.placementFromWinner(match.resulttype, match.winner, opponentIndex) + end) end match.mode = Logic.emptyOr(match.mode, Variables.varDefault('tournament_mode', 'team')) diff --git a/components/match2/wikis/easportsfc/match_group_input_custom.lua b/components/match2/wikis/easportsfc/match_group_input_custom.lua index 244f1b15bab..b693b69540a 100644 --- a/components/match2/wikis/easportsfc/match_group_input_custom.lua +++ b/components/match2/wikis/easportsfc/match_group_input_custom.lua @@ -62,7 +62,9 @@ function CustomMatchGroupInput.processMatch(match, options) match.resulttype = MatchGroupInputUtil.getResultType(winnerInput, finishedInput, opponents) match.walkover = MatchGroupInputUtil.getWalkover(match.resulttype, opponents) match.winner = MatchGroupInputUtil.getWinner(match.resulttype, winnerInput, opponents) - MatchGroupInputUtil.setPlacement(opponents, match.winner, 1, 2, match.resulttype) + Array.forEach(opponents, function(opponent, opponentIndex) + opponent.placement = MatchGroupInputUtil.placementFromWinner(match.resulttype, match.winner, opponentIndex) + end) end match.mode = Logic.emptyOr(match.mode, Variables.varDefault('tournament_mode', 'solo')) diff --git a/components/match2/wikis/tft/match_group_input_custom.lua b/components/match2/wikis/tft/match_group_input_custom.lua index 537fc4ba4a2..1cf4cea0c79 100644 --- a/components/match2/wikis/tft/match_group_input_custom.lua +++ b/components/match2/wikis/tft/match_group_input_custom.lua @@ -56,7 +56,9 @@ function CustomMatchGroupInput.processMatch(match, options) match.resulttype = MatchGroupInputUtil.getResultType(winnerInput, finishedInput, opponents) match.walkover = MatchGroupInputUtil.getWalkover(match.resulttype, opponents) match.winner = MatchGroupInputUtil.getWinner(match.resulttype, winnerInput, opponents) - MatchGroupInputUtil.setPlacement(opponents, match.winner, 1, 2, match.resulttype) + Array.forEach(opponents, function(opponent, opponentIndex) + opponent.placement = MatchGroupInputUtil.placementFromWinner(match.resulttype, match.winner, opponentIndex) + end) end Table.mergeInto(match, MatchGroupInputUtil.getTournamentContext(match))