Adjust multiplayer logic to accommodate for referees spectating in-game#37152
Open
bdach wants to merge 14 commits intoppy:masterfrom
Open
Adjust multiplayer logic to accommodate for referees spectating in-game#37152bdach wants to merge 14 commits intoppy:masterfrom
bdach wants to merge 14 commits intoppy:masterfrom
Conversation
- Referees can start a game at any point, instantly or via countdown. For improved UX, at least 1 readied-up user is required for instant start. - Referees can abort a game. - Referees cannot ready up themselves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a corollary of ppy/osu-server-spectator#453 and all of the dispensations referee users in a multiplayer have received therein. The goal here is to allow access to all relevant room management functions even if the referee in question isn't host, as well as to disallow access to all non-relevant functions to do with the actual match gameplay.
I'm not going to lie, this logic is ugly. I would argue that it already was ugly on
masterand my goal was to operate with as light a touch as possible myself. But you could see this as copping out and that I should try to refactor some of this. I will try - but only after someone else's seen the initial approach and deemed it unsuitable.The logic in
MatchStartControlis awful - there are so many moving pieces of state that dictate what can happen when with all the buttons, and yes, I am making it worse here.This time there is some test coverage. Not everything is covered, but the coverage should be on par in all components and pieces of relevant logic I touched that already had tests covering them. On that note, please forgive the diffstat size, but the tests are most of that size.