Skip to content

Commit

Permalink
as per review
Browse files Browse the repository at this point in the history
  • Loading branch information
hjpalpha committed Nov 8, 2024
1 parent 60c6d12 commit 41fe4a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions components/match2/commons/match_group_input_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,6 @@ end
---@field getMapMode? fun(match: table, game: table, opponents: table[]): string?
---@field getPlayersOfMapOpponent? fun(game: table, opponent:table, opponentIndex: integer): table[]
---@field getPatch? fun(game: table): string?
---@field getMode? fun(game: table, opponenets: table[]): string?
---@field isFinished? fun(map: table, opponents: table[], finishedInput: string?, winnerInput: string?): boolean
---@field getParticipants? fun(game: table, opponents:table[]): table ---@deprecated
---@field ADD_SUB_GROUP? boolean
Expand All @@ -1145,7 +1144,6 @@ end
--- - getMapMode(match, map, opponents): string?
--- - getPlayersOfMapOpponent(map, opponent, opponentIndex): table[]?
--- - getPatch(game): string?
--- - getMode(game, opponenets): string?
--- - isFinished(map, opponents): boolean
--- - getParticipants(map, opponents, finishedInput, winnerInput): table (DEPRECATED)
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,11 @@ function MapFunctions.getPartyMapPlayers(mapInput, opponent, opponentIndex)
end)
end

---@param match table
---@param map table # has map.opponents as the games opponents
---@param opponents table[]
---@return string
function MapFunctions.getMode(map, opponents)
function MapFunctions.getMapMode(match, map, opponents)
local playerCounts = Array.map(map.opponents, function(opponent)
return Table.size(opponent.players)
end)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function MatchFunctions.extractMaps(match, opponents)
opponent.players = BaseMapFunctions.getPlayersOfMapOpponent(map, opponent, opponentIndex)
end)

map.mode = BaseMapFunctions.getMode(map, opponents)
map.mode = BaseMapFunctions.getMapMode(match, map, opponents)

table.insert(maps, map)
match[mapKey] = nil
Expand Down

0 comments on commit 41fe4a3

Please sign in to comment.