Skip to content

Commit

Permalink
feat(match2): remove now unused sc(2) input alises (#4749)
Browse files Browse the repository at this point in the history
* feat(match2): kick deprecated alias stuff on sc(2)

* kick aliases in ffa MGI too
  • Loading branch information
hjpalpha authored Sep 17, 2024
1 parent 178ce9c commit b1d713f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ function StarcraftMatchGroupInput.processMatch(match, options)

local opponents = MatchFunctions.readOpponents(match)

-- TODO: check how we can get rid of this legacy stuff ...
Array.forEach(opponents, function(opponent, opponentIndex)
local opponentHasWon = Table.extract(opponent, 'win')
if not Logic.readBool(opponentHasWon) then return end
mw.ext.TeamLiquidIntegration.add_category('Pages with matches using `win` in opponents')
match.winner = match.winner or opponentIndex
end)

local games = MatchFunctions.extractMaps(match, opponents)

local autoScoreFunction = MatchGroupInputUtil.canUseAutoScore(match, games)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,6 @@ function StarcraftFfaMatchGroupInput.processMatch(match, options)
or match.pbg[opponent.placement]
or DEFUALT_BACKGROUND

-- todo: get rid of the damn alias ...
if Logic.isEmpty(opponent.advances) and Logic.isNotEmpty(opponent.win) then
opponent.advances = opponent.win
mw.ext.TeamLiquidIntegration.add_category('Pages with ffa matches using `win=` in opponents')
end

opponent.extradata.advances = Logic.readBool(opponent.advances)
or (match.bestof and (opponent.score or 0) >= match.bestof)
or opponent.extradata.bg == ADVANCE_BACKGROUND
Expand Down Expand Up @@ -262,14 +256,6 @@ function MapFunctions.readMap(mapInput, opponentCount, hasScores)
return map
end

-- todo: get rid of the damn alias ...
Array.forEach(Array.range(1, opponentCount), function(opponentIndex)
if not map['score' .. opponentIndex] and map['points' .. opponentIndex] then
mw.ext.TeamLiquidIntegration.add_category('Pages with ffa matches using `pointsX=` in maps')
map['score' .. opponentIndex] = map['points' .. opponentIndex]
end
end)

local opponentsInfo = Array.map(Array.range(1, opponentCount), function(opponentIndex)
return MapFunctions.getOpponentInfo(mapInput, opponentIndex, hasScores)
end)
Expand Down

0 comments on commit b1d713f

Please sign in to comment.