Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(match2): remove now unused sc(2) input alises #4749

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading