Skip to content

Commit

Permalink
1st update
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Hesketh2 authored Dec 25, 2024
1 parent 3c09fb1 commit 480635b
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions components/match2/wikis/fortnite/match_group_input_custom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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[]
Expand Down Expand Up @@ -146,5 +129,4 @@ function FfaMapFunctions.getExtraData(match, map, opponents)
}
end


return CustomMatchGroupInput

0 comments on commit 480635b

Please sign in to comment.