Conversation
faa7c37 to
3fbf2f9
Compare
looks slightly better
| function AutomaticPointsTable:storeLPDB(opponents) | ||
| local date = DateExt.getContextualDateOrNow() | ||
| Array.forEach(opponents, function(opponent) | ||
| local teamName = Opponent.toName(opponent.opponent) |
There was a problem hiding this comment.
should rename, assuming we support this for non team opponents
There was a problem hiding this comment.
actually it is limited to team opponents:
Lua-Modules/lua/wikis/commons/AutomaticPointsTable.lua
Lines 160 to 161 in 21e0e5d
- the old version supports teams only
- I didn't bother expanding to party opponents mainly to keep the old alias handling behavior
There was a problem hiding this comment.
ugh, so this module is entirely unusable for quite a few wikis...
There was a problem hiding this comment.
well I think that it wouldn't be too hard to expand this to party opponents
we might need to rethink how to handle alias crap from scratch though
There was a problem hiding this comment.
Alias should only be necessary for teams tho, no?
hjpalpha
left a comment
There was a problem hiding this comment.
seems cleaner, but still useless/unusable for lots of wikis
¯_(ツ)_/¯
| tournaments[tournamentIndex].shouldDeductionsBeVisible = true | ||
| totalPoints = totalPoints - (deduction.amount or 0) | ||
| end | ||
| local prizePoints = tonumber(result.extradata.prizepoints) |
There was a problem hiding this comment.
Since by now extradata.prizepoints2 is standardized storage, this module should support using it.
Ideally the use of it can be configured per tournament.
| totalPoints = totalPoints - (deduction.amount or 0) | ||
| end | ||
| local prizePoints = tonumber(result.extradata.prizepoints) | ||
| local securedPoints = tonumber(result.extradata.securedpoints) |
There was a problem hiding this comment.
securedpoints is not standardized and should not be used.
It can easily be replaced by a check on result.placement being empty combined with an LPDB call to fetch the minimum points, fetching only TBD placements and taking the lowest prizepoint value of these.
Summary
Module:AutomaticPointsTableis an unused "legacy" component that has been left abandoned for years, while the "live" version used on wikis is a worse spaghetti that is not even on this repository. This PR rewrites the module with the current standards.How did you test this change?
https://liquipedia.net/valorant/User:ElectricalBoy/Sandbox3