diff --git a/components/match2/commons/starcraft_starcraft2/match_group_input_starcraft_ffa.lua b/components/match2/commons/starcraft_starcraft2/match_group_input_starcraft_ffa.lua index 3287338a09..64809a5095 100644 --- a/components/match2/commons/starcraft_starcraft2/match_group_input_starcraft_ffa.lua +++ b/components/match2/commons/starcraft_starcraft2/match_group_input_starcraft_ffa.lua @@ -202,7 +202,7 @@ function MapFunctions.readMap(mapInput, opponentCount, hasScores) end map.opponents = Array.map(Array.range(1, opponentCount), function(opponentIndex) - return MapFunctions.getOpponentInfo(mapInput, opponentIndex, hasScores) + return MapFunctions.getOpponentInfo(mapInput, opponentIndex) end) map.scores = Array.map(map.opponents, Operator.property('score')) @@ -236,11 +236,10 @@ function MapFunctions.isFinished(mapInput, opponentCount, hasScores) end) end ----@param mapInput any ----@param opponentIndex any ----@param hasScores any +---@param mapInput table +---@param opponentIndex integer ---@return {placement: integer?, score: integer?, status: string} -function MapFunctions.getOpponentInfo(mapInput, opponentIndex, hasScores) +function MapFunctions.getOpponentInfo(mapInput, opponentIndex) local score, status = MatchGroupInputUtil.computeOpponentScore{ walkover = mapInput.walkover, winner = mapInput.winner, @@ -250,7 +249,7 @@ function MapFunctions.getOpponentInfo(mapInput, opponentIndex, hasScores) return { placement = tonumber(mapInput['placement' .. opponentIndex]), - score = hasScores and score or nil, + score = score, status = status, } end