-
Notifications
You must be signed in to change notification settings - Fork 69
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): Support the use of playall instead of bestof #5148
base: main
Are you sure you want to change the base?
Conversation
Added a new type for player leave as they did not represent a team at a tournament
Update transfer_references.lua
Added a new type for player leave as they did not represent a team at a tournament
components/match2/wikis/ageofempires/match_group_input_custom.lua
Outdated
Show resolved
Hide resolved
components/match2/wikis/counterstrike/match_group_input_custom.lua
Outdated
Show resolved
Hide resolved
How commons would thise be? If it's only a few matches one can always set |
Used for quite a number of recent non-official tournaments, we have not had the manpower to cover many of those, but thought it was something that could be used as an alternative for best of |
Co-authored-by: Rikard Blixt <[email protected]>
function MatchGroupInputUtil.allHasBeenPlayed(playall, opponents) | ||
local scoreSum = Array.reduce(opponents, function(sum, opponent) return sum + (opponent.score or 0) end, 0) | ||
return scoreSum >= playall | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function MatchGroupInputUtil.allHasBeenPlayed(playall, opponents) | |
local scoreSum = Array.reduce(opponents, function(sum, opponent) return sum + (opponent.score or 0) end, 0) | |
return scoreSum >= playall | |
end | |
function MatchGroupInputUtil.allHasBeenPlayed(games) | |
return Array.all(games, function(game) return game.finished end) | |
end |
Wouldn't this do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm you are right in this case then, shouldn't we just refactor playall
to be a true/false variable, since the number of games for bestof
is calculated by number of maps that are in the input?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not the case on all wikis fwiw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I mean like the use of PlayAll is currently only calculated if PlayAll is non-zero? And thus far this has no representation, for example, in making Ticker use {{Abbr/PaX}}
instead of {{Abbr/BoX}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the true/false version personally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it that way instead in the below commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah wait a second, breaks when no maps are provided :/
Reverted to the proposal where |
Summary
Attempted to create and store a new variable
playall
for Match Series that requires teams to play out a fixed number of games (instead of a bestof)How did you test this change?
dev