From 480635b9c69c208a439c72e0dc7972d3438680c3 Mon Sep 17 00:00:00 2001 From: Hesketh2 <88981446+Hesketh2@users.noreply.github.com> Date: Wed, 25 Dec 2024 20:50:20 +0700 Subject: [PATCH] 1st update - use commons bestof - not sure what to do with unset maps, but try removing it and nothing breaks - empty lines seems like typo from me --- .../fortnite/match_group_input_custom.lua | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/components/match2/wikis/fortnite/match_group_input_custom.lua b/components/match2/wikis/fortnite/match_group_input_custom.lua index 20c116af3b..329673214e 100644 --- a/components/match2/wikis/fortnite/match_group_input_custom.lua +++ b/components/match2/wikis/fortnite/match_group_input_custom.lua @@ -20,14 +20,13 @@ local MatchFunctions = { applyUnderScores = true, maxNumPlayers = 3, }, - DEFAULT_MODE = 'team' + DEFAULT_MODE = 'team', + getBestOf = MatchGroupInputUtil.getBestOf, } local FfaMatchFunctions = {} local MapFunctions = {} local FfaMapFunctions = {} -local DEFAULT_BESTOF = 3 - ---@param match table ---@param options table? ---@return table @@ -63,22 +62,6 @@ function MatchFunctions.calculateMatchScore(maps) end end ----@param bestofInput string|integer? ----@return integer -function MatchFunctions.getBestOf(bestofInput) - local bestof = tonumber(bestofInput) or tonumber(Variables.varDefault('match_bestof')) or DEFAULT_BESTOF - Variables.varDefine('match_bestof', bestof) - return bestof -end - ----@param games table[] ----@return table[] -function MatchFunctions.removeUnsetMaps(games) - return Array.filter(games, function(map) - return map.map ~= nil - end) -end - ---@param match table ---@param map table ---@param opponents table[] @@ -146,5 +129,4 @@ function FfaMapFunctions.getExtraData(match, map, opponents) } end - return CustomMatchGroupInput