From 14fc6bba29cc01948ffee7318d4a68e0a0baa521 Mon Sep 17 00:00:00 2001 From: Rikard Blixt Date: Thu, 12 Dec 2024 11:11:06 +0100 Subject: [PATCH] init value --- components/match2/commons/match_group_input.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/match2/commons/match_group_input.lua b/components/match2/commons/match_group_input.lua index 388530e386..5014fab67d 100644 --- a/components/match2/commons/match_group_input.lua +++ b/components/match2/commons/match_group_input.lua @@ -348,10 +348,12 @@ function MatchGroupInput.applyOverrideArgs(matches, args) end end +---@param matches {match2opponents: table[]}[] +---@return integer function MatchGroupInput.getMaxOpponentCount(matches) return Array.reduce(matches, function(cur, match) return math.max(#match.match2opponents, cur) - end) + end, 0) end ---@param headerInput string?