- Last part of / closes
https://github.com/ppy/osu-server-spectator/issues/406.
- Remaining work on slots will be tracked in
https://github.com/ppy/osu-server-spectator/issues/405.
This PR is a corollary of
https://github.com/ppy/osu-server-spectator/pull/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 `master` and 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 `MatchStartControl` is 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.
---------
Co-authored-by: Dean Herbert <pe@ppy.sh>
https://github.com/user-attachments/assets/042311f1-b8c3-479b-a173-13b93fe2c5cc
- `/roll` command is now supported in multiplayer chat for all players
(don't need to be a referee).
- Referees are shown in the room with a special status.
- Tournament mode rooms can be locked, which prevents users from
changing team (and slot, whenever those get brought back). When the room
is locked, the user team indicator shows a padlock icon on top to
indicate the lock state.
---
- Related: https://github.com/ppy/osu-server-spectator/issues/406
Grab-bag because I really don't think splitting this into 3 PRs is very
helpful.
I was going to add an animation for rolling but I had a go on Friday and
my attempt got more or less the same reception as a wet fart so I'm not
trying again. Someone else can if so inclined. I have completely lost
trust in my design senses.
Contrary to stable the roll results are completely ephemeral and go away
when the room is re-entered. This could be both considered good and bad.
Not for me to say.
Didn't really work to fix these tests due to the sticky nature of the
failure. Also I can no longer reproduce locally, so the hope is that
these are fixed by https://github.com/ppy/osu/pull/30634.
After switching `UserLookupCache` to `GET /users/lookup` from `GET
/users`, multiplayer sort of breaks, since the former endpoint does not
return `ruleset_statistics`, which are used in multiplayer to show
users' ranks. Therefore, switch multiplayer to use the appropriate
request type directly.