Liquipedia / Lua-Modules

Used to keep versions of some important lua modules of the Liquipedia wiki that we want better version control for.
Other
31 stars 69 forks source link

feat(match2): proper storage for mapOpponent.players on valorant #5112

Closed Rathoz closed 11 hours ago

Rathoz commented 3 days ago

Summary

Rework the parsing function to ensure we always end up with an array, and all players are also in their correct positions. This PR only implements it on Valorant. Other wikis will be rolled out afterwards.

How did you test this change?

By HJP

hjpalpha commented 2 days ago

i think we also need to change https://github.com/Liquipedia/Lua-Modules/blob/ccdcbc6fd3e4bdc7b1bf29181bb2961d9c3e81f5/components/match2/commons/match_group_util.lua#L715 to

    local opponents = record.opponents or Array.map(Array.range(1, opponentCount or 2), function (_, index)

so that the opponnets data stored is also available in matchsummary

hjpalpha commented 2 days ago

tested in combination with #5111 (plus the above suggested changes) on sc, sc2, sg and wc

Rathoz commented 1 day ago

i think we also need to change

https://github.com/Liquipedia/Lua-Modules/blob/ccdcbc6fd3e4bdc7b1bf29181bb2961d9c3e81f5/components/match2/commons/match_group_util.lua#L715

to

  local opponents = record.opponents or Array.map(Array.range(1, opponentCount or 2), function (_, index)

so that the opponnets data stored is also available in matchsummary

5084