1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 17:37:50 +08:00
Commit Graph

273 Commits

Author SHA1 Message Date
Dean Herbert
7f82a06a61 Remove no longer used using directive 2021-02-05 23:08:31 +09:00
Dean Herbert
0679901e4d Update error handling 2021-02-05 22:53:40 +09:00
Dean Herbert
3ca64a1cb2 Merge branch 'master' into playlist-max-room-attempts 2021-02-05 22:13:13 +09:00
smoogipoo
95ad7ea8f7 Fix mods on participant panels flashing when changed 2021-02-05 18:44:33 +09:00
Dean Herbert
f338fa114b
Merge branch 'master' into user-beatmap-downloading-states-2 2021-02-05 18:02:40 +09:00
Dean Herbert
791cbb7f03 Don't reset ready state if the map is locally available 2021-02-05 17:17:29 +09:00
Dean Herbert
3e750feaa4 Subclass LocalPlayerModSelectOverlay to correctly deselect incompatible mods on free mod selection 2021-02-05 16:42:35 +09:00
Dean Herbert
be91f54349 Add back edge case with comment 2021-02-05 16:19:45 +09:00
Dean Herbert
9ba5ae3db7 Remove lots of unnecessary client side logic 2021-02-05 16:17:02 +09:00
Dean Herbert
1b6a052798 Refactor logic to suck a bit less 2021-02-05 15:46:03 +09:00
Dean Herbert
d1f9aa52a4 Inline variable 2021-02-05 15:33:48 +09:00
Dean Herbert
9e9e382bee Merge branch 'master' into user-beatmap-downloading-states-2 2021-02-05 15:27:17 +09:00
Dean Herbert
2fc3a97f56
Merge pull request #11516 from frenzibyte/ready-button-clean-up
Replace ready button beatmap logic with using `MultiplayerBeatmapTracker` instead
2021-02-05 15:09:25 +09:00
Dean Herbert
de8724b1f6 Use AddRangeInternal for simplicity, but disallow ClearInternal for safety 2021-02-05 14:39:25 +09:00
Dean Herbert
fc37d8b7df Refactor content redirection logic to be easier to parse 2021-02-05 14:25:19 +09:00
Dean Herbert
9258836f10
Merge pull request #11641 from smoogipoo/freemods
Add support for optional per-user mods in multiplayer (aka freemod)
2021-02-05 13:59:30 +09:00
Salman Ahmed
78ea2d50bb Merge branch 'master' into ready-button-clean-up 2021-02-05 07:23:11 +03:00
smoogipoo
df2da5950f Add back vertical spacer 2021-02-05 13:09:13 +09:00
smoogipoo
2e85ce5b82 Rename UserMods -> Mods for MultiplayerRoomUser 2021-02-05 12:40:16 +09:00
Dan Balasescu
a71d6a4c97
Merge branch 'master' into multiplayer-beatmap-tracker 2021-02-05 12:25:36 +09:00
smoogipoo
a2fdba3e51 Rename to OnlinePlayBeatmapAvailabilityTracker 2021-02-05 12:24:38 +09:00
smoogipoo
cf5233c6ab Merge branch 'master' into freemods 2021-02-05 00:27:14 +09:00
Dean Herbert
f23ca7c7cf Centralise selection animation logic 2021-02-04 18:10:55 +09:00
Dean Herbert
daf7ab9422 Apply the expected font to the checkbox's label 2021-02-04 16:58:15 +09:00
Dean Herbert
48a58e790e Don't specify arbitrary width 2021-02-04 16:57:39 +09:00
Bartłomiej Dach
cb87da2bb8
Merge branch 'master' into freemod-select-overlay 2021-02-03 22:19:35 +01:00
Dean Herbert
b06f4ee124
Merge branch 'master' into solo-mod-select-overlay 2021-02-03 23:44:08 +09:00
Dean Herbert
17072a5dda
Merge pull request #11664 from smoogipoo/modselect-dynamic-isvalid
Make it possible to change IsValidMod in mod selection
2021-02-03 23:43:36 +09:00
Dean Herbert
2a52851e68
Merge branch 'master' into modselect-dynamic-isvalid 2021-02-03 22:11:33 +09:00
Dean Herbert
9d7164816c Add reverse binding for max attempts (currently unused but good for safety) 2021-02-03 22:02:40 +09:00
Dean Herbert
3fe190cfbe Show original error message on web exceptions (or is no message is returned) 2021-02-03 22:00:16 +09:00
Dan Balasescu
f24a6178bc
Merge branch 'master' into ongoing-tracker-fix-more 2021-02-03 21:00:45 +09:00
smoogipoo
21d5f842fc Re-layout to reduce movement 2021-02-03 14:53:55 +09:00
Dan Balasescu
2a4488c11b
Merge branch 'master' into freemods 2021-02-03 14:12:39 +09:00
Bartłomiej Dach
fc84ec1313 Move anchor specification to central place 2021-02-02 22:18:14 +01:00
Bartłomiej Dach
181d2c672b Fix outdated comment 2021-02-02 22:05:25 +01:00
Bartłomiej Dach
fe7f4f7222
Merge branch 'master' into playlists-item-visual-improvements 2021-02-02 21:26:16 +01:00
Salman Ahmed
50d57a3931 Move tracker loading into BDL 2021-02-02 17:22:48 +03:00
smoogipoo
aeb3ed8bb3 Renamespace footer button 2021-02-02 21:46:22 +09:00
smoogipoo
6453367a9c Merge branch 'freemod-select-overlay' into freemods 2021-02-02 21:43:35 +09:00
smoogipoo
097ce37e96 Merge branch 'fix-mod-icon' into freemods 2021-02-02 21:37:24 +09:00
smoogipoo
6ff8e8dd37 Disable a few mods by default 2021-02-02 21:29:08 +09:00
smoogipoo
5a56e2ba4b Fix sound duplication due to checkbox 2021-02-02 21:29:00 +09:00
smoogipoo
643c0605d8 Implement the freemod selection overlay 2021-02-02 21:14:38 +09:00
smoogipoo
e58ece9e10 Make ModSelectOverlay abstract 2021-02-02 21:06:04 +09:00
smoogipoo
10ceddf3ff Make IsValidMod adjustable 2021-02-02 20:47:50 +09:00
smoogipoo
a2e3b1c0e4 Move Mods reset code to OnlinePlaySongSelect 2021-02-02 19:02:39 +09:00
Dean Herbert
fc3adaf612 Show maximum attempt count in room display (when not unlimited) 2021-02-02 18:45:05 +09:00
Dean Herbert
9b209d67dc Match size of participants text with host display 2021-02-02 18:45:05 +09:00
Dean Herbert
96d20bf607 Reduce height of ModeTypeInfo to match adjacent text sections 2021-02-02 18:45:05 +09:00
Dean Herbert
90acdd4361 Display the correct error message on score submission failure
The server will return a valid error message in most cases here. We may
eventually want to add some fallback message for cases an error may
occur that isn't of
[InvariantException](3169b33ccc/app/Exceptions/InvariantException.php (L9-L10)) type, but I'm not 100% sure
how to identify these just yet.
2021-02-02 18:45:05 +09:00
Dean Herbert
6fdaf02518 Hook up room-level max attempts to UI 2021-02-02 18:45:05 +09:00
Dean Herbert
40233fb47c Make font bolder 2021-02-02 17:09:59 +09:00
Dean Herbert
6d9ac4d0f0 Increase darkness of gradient on buttons to make text readability (slightly) better 2021-02-02 16:57:27 +09:00
Dean Herbert
fb52ac8c69 Share remove from playlist button design with adjacent download button 2021-02-02 16:57:08 +09:00
Dean Herbert
bdc05af4b7 Make playlist settings area taller to better match screen aspect ratio 2021-02-02 16:30:45 +09:00
smoogipoo
0bce9d6833 Clear freemods when ruleset is changed 2021-02-02 13:54:58 +09:00
smoogipoo
173e20938c Revert changes to ModDisplay 2021-02-02 13:49:58 +09:00
smoogipoo
87f9e46b16 Add option to select all 2021-02-02 13:37:25 +09:00
smoogipoo
9c3c0895cf Hide customise button + multiplier label 2021-02-02 13:36:58 +09:00
smoogipoo
7a14e14e67 Refactor condition
This won't make any noticeable difference, but is the more correct way
to handle MultiMod because flattening works through infinite recursion levels.
2021-02-02 12:54:26 +09:00
smoogipoo
b54f65c282 Exclude more mods from multiplayer 2021-02-02 12:48:15 +09:00
smoogipoo
4cf52077b6 Make checkbox also respond to all mods selected 2021-02-02 11:11:28 +09:00
smoogipoo
97e3023df9 Renamespace/rename MatchSongSelect -> PlaylistsSongSelect 2021-02-01 20:16:58 +09:00
smoogipoo
e5ca9b1e50 Remove usage of removed method 2021-02-01 19:28:33 +09:00
smoogipoo
9c4c47599f Merge branch 'master' into freemods 2021-02-01 19:28:10 +09:00
smoogipoo
ee92ec0a5c Disallow local user mod customisation 2021-02-01 18:54:47 +09:00
smoogipoo
89a42d60fb General cleanup 2021-02-01 18:50:32 +09:00
smoogipoo
3a906a89fc Pin mod position in participant panels 2021-02-01 18:27:15 +09:00
smoogipoo
51cb288717 Reduce mod selection height 2021-02-01 18:18:59 +09:00
smoogipoo
e134af82f5 Stack freemods for the local user 2021-02-01 18:16:38 +09:00
smoogipoo
3e74f8fd9e Disable customisation of freemods, move stacking to property 2021-02-01 18:11:20 +09:00
smoogipoo
3cd30d284e Renamespace 2021-02-01 18:08:49 +09:00
smoogipoo
f538963607 Extra mods -> user mods 2021-02-01 17:57:32 +09:00
smoogipoo
ac2a995041 Add user and panel states 2021-02-01 17:54:56 +09:00
Dean Herbert
1d8de2f718 Rename class to better match purpose 2021-02-01 17:32:54 +09:00
Dean Herbert
c73a05d0b5
Merge branch 'master' into multiplayer-beatmap-tracker 2021-02-01 17:24:24 +09:00
smoogipoo
0909c73ead Once again disallow DT/etc as allowable mods 2021-02-01 15:07:56 +09:00
smoogipoo
b43e529964 Fix allowed mods being copied into required mods 2021-02-01 15:07:43 +09:00
smoogipoo
426569c2a9 Move common song select implementation for online play 2021-02-01 14:57:39 +09:00
smoogipoo
b846146f16 Update mods when resuming room subscreen 2021-02-01 13:58:44 +09:00
smoogipoo
4ae10b1e1c Add initial UI for selecting extra mods 2021-02-01 13:40:59 +09:00
smoogipoo
e02e3cf19a Disallow selecting DT/HT/WU/WD as allowable freemods 2021-02-01 13:35:48 +09:00
smoogipoo
797a810287 Allow unstacking mods 2021-02-01 13:24:56 +09:00
smoogipoo
230b347c1e Move ModSelectOverlay.IsValidMod to a property 2021-02-01 12:18:11 +09:00
Bartłomiej Dach
90ba8ae234 Don't part room if join task was cancelled 2021-01-30 23:39:01 +01:00
Bartłomiej Dach
5f320cd426 Move lease check inside schedule
Theoretically safer due to avoiding a potential data race (change in
`leasedInProgress` between the time of the check and start of schedule
execution).
2021-01-30 21:03:09 +01:00
Bartłomiej Dach
96f56d1c94 Return tracker lease via UnbindAll()
Improves reliability by being fail-safe in case of multiple returns,
which can happen if the operation tracker is part of a screen being
exited (as is the case with its current primary usage in multiplayer).
2021-01-30 21:00:13 +01:00
Dean Herbert
a61444690e Remove all usage of CatchUnobservedExceptions
This should no longer be required with the recent framework side change
that stops a game from crashing on unobserved exceptions
(https://github.com/ppy/osu-framework/pull/4171).
2021-01-29 16:32:29 +09:00
smoogipoo
b79d1c7b81 Add mods to footer 2021-01-27 22:33:03 +09:00
smoogipoo
ff8ee379fb Fix possible nullref 2021-01-27 22:27:31 +09:00
smoogipoo
4c256f1fb3 Actually populate the playlist item 2021-01-27 22:23:38 +09:00
smoogipoo
45e41aaeac Initial implementation of freemod selection overlay 2021-01-27 22:15:53 +09:00
Dean Herbert
10e8b7082e Rework logic to avoid custom disposal early return handling 2021-01-25 16:53:58 +09:00
Bartłomiej Dach
d22f557a3b Remove possibility of double-disposal interference 2021-01-23 16:14:58 +01:00
Bartłomiej Dach
7f89d9117d Make disposal of tracker idempotent for operations 2021-01-23 16:04:12 +01:00
Bartłomiej Dach
18b309a195 Make disposal of tracker operation idempotent 2021-01-23 16:02:51 +01:00
Dean Herbert
e6980688f6 Leave the multiplayer channel when leaving multiplayer 2021-01-21 15:42:23 +09:00
Dan Balasescu
7da7079ef2
Merge pull request #11537 from Mysfit/mp-initial-creation-screen-fix
Fix match/playlist room screen showing briefly behind initial room settings window on creation.
2021-01-20 22:05:14 +09:00
Dan Balasescu
455383c3c0
Merge pull request #11528 from peppy/fix-autoplay-in-multiplayer
Fix multiplayer mod select showing autoplay as a choice
2021-01-20 21:49:16 +09:00
Salman Ahmed
34612ae233 Forward internal management to a container alongside tracker 2021-01-19 20:01:22 +03:00
Mysfit
052e9eef02 Added inline comments 2021-01-19 09:16:39 -05:00
Mysfit
33677f5770 Use BindValueChanged to show main content for new multiplayer and playlist rooms when the settings overlay is hidden. 2021-01-19 08:52:43 -05:00
Mysfit
6d1d488831 Revert "Use the client.RoomUpdated action instead of binding the value of the settings overlay visibility and creating an event from it based on its ValueChanged action."
This reverts commit cbfb999c28.
2021-01-19 08:24:14 -05:00
Mysfit
9b7187e3c8 Revert "Use fades instead of event listening. Fixed same issue in the playlist room creation."
This reverts commit 3a7608275d.
2021-01-19 08:23:31 -05:00
smoogipoo
de9d075f94 Initial sample + samplechannel rework 2021-01-19 17:11:40 +09:00
Mysfit
3a7608275d Use fades instead of event listening. Fixed same issue in the playlist room creation. 2021-01-19 00:35:56 -05:00
Mysfit
cbfb999c28 Use the client.RoomUpdated action instead of binding the value of the settings overlay visibility and creating an event from it based on its ValueChanged action. 2021-01-18 17:13:24 -05:00
Mysfit
5233a0449a Hide main room subscreen on initial mp room creation. Toggle mp room subscreen visibility based on settings overlay visibility before room is created. 2021-01-18 16:08:06 -05:00
Salman Ahmed
4a1acdece2 Merge branch 'multiplayer-beatmap-tracker' into ready-button-clean-up 2021-01-18 20:06:47 +03:00
Salman Ahmed
dc91cebce9 Merge branch 'master' into multiplayer-beatmap-tracker 2021-01-18 19:15:45 +03:00
Salman Ahmed
e6ceaad732 Revert user state back to idle upon availability change 2021-01-18 17:23:51 +03:00
Dean Herbert
0b165dce4b Fix multiplayer mod select showing autoplay as a choice 2021-01-18 17:50:32 +09:00
Salman Ahmed
6deb10e075 Add UI state display for each client's beatmap availability 2021-01-18 11:10:02 +03:00
Salman Ahmed
4e6c1a3906 Update client beatmap availability in-line with tracker 2021-01-18 10:51:39 +03:00
Salman Ahmed
585aa87c53 Fix playlist item download button never shown back after hiding 2021-01-17 19:17:14 +03:00
Dean Herbert
5fd644fc57 Unify variable names 2021-01-17 22:42:48 +09:00
Dean Herbert
edb6d3907b
Merge pull request #11472 from frenzibyte/explicit-beatmap-markers
Add explicit content markers to beatmap panels and overlay
2021-01-17 21:44:10 +09:00
Salman Ahmed
59ae50b0e5 Clean up ready button logic into using MultiplayerBeatmapTracker 2021-01-17 01:11:03 +03:00
Salman Ahmed
cf23781036 Cache beatmap tracker and bind to selected item in RoomSubScreen 2021-01-17 00:01:11 +03:00
Dan Balasescu
67b5ebadf5
Merge branch 'master' into fix-is-connected-thread-safety 2021-01-15 12:56:21 +09:00
Dan Balasescu
3e8732a59f
Merge branch 'master' into fix-participants-list 2021-01-14 21:30:53 +09:00
Salman Ahmed
1502b07ea8 Add explicit pill to playlist items 2021-01-13 12:27:15 +03:00
Bartłomiej Dach
2d3cacca11 Fix non-hosts crashing on load requested
`onLoadRequested()` always released the `readyClickOperation` ongoing
operation, without checking whether it actually needs to/should (it
should only do so if the action initiating the operation was starting
the game by the host). This would crash all other consumers, who already
released the operation when their ready-up operation completed server
side.

To resolve, relax the constraint such that the operation can be ended
multiple times in any order. At the end of the day the thing that
matters is that the operation is done and the ready button is unblocked.
2021-01-13 00:58:53 +01:00
Dean Herbert
7298adc9d9 Fix non-threadsafe usage of MultiplayerClient.IsConnected 2021-01-12 19:04:16 +09:00
Dean Herbert
b51b07c3a9 Fix unstable multiplayer room ordering when selection is made 2021-01-12 18:05:29 +09:00
Dean Herbert
422260797b Revert polling changes to fix participant list display
It turns out this polling was necessary to get extra data that isn't
included in the main listing request. It was removed deemed useless, and
in order to fix the order of rooms changing when selecting a room.
Weirdly, I can't reproduce this happening any more, and on close
inspection of the code can't see how it could happen in the first place.

For now, let's revert this change and iterate from there, if/when the
same issue arises again.

I've discussed avoiding this second poll by potentially including more
data (just `user_id`s?) in the main listing request, but not 100% sure
on this - even if the returned data is minimal it's an extra join
server-side, which could cause performance issues for large numbers of
rooms.
2021-01-12 17:26:00 +09:00
Bartłomiej Dach
8c3955d341 Improve safety of ongoing operation tracker
Finishing an operation started via
`OngoingOperationTracker.BeginOperation()` was risky in cases where the
operation ended at a callback on another thread (which, in the case of
multiplayer, is *most* cases). In particular, if any consumer registered
a callback that mutates transforms when the operation ends, it would
result in crashes after the framework-side safety checks.

Rework `OngoingOperationTracker` into an always-present component
residing in the drawable hierarchy, and ensure that the
`operationInProgress` bindable is always updated on the update thread.
This way consumers don't have to add local schedules in multiple places.
2021-01-09 22:45:24 +01:00
Dean Herbert
b69fe8a274
Merge branch 'master' into disable-repeat-multi-actions 2021-01-09 10:15:20 +09:00
Bartłomiej Dach
c2eeb822b8 Rename {joiningRoom -> operationInProgress} 2021-01-08 22:23:38 +01:00
Bartłomiej Dach
dad5dd3667 Remove unnecessary permissiveness wrt null 2021-01-08 22:21:54 +01:00
Dean Herbert
edd328c8fe Move bindable closer to source class 2021-01-08 17:24:55 +09:00
Bartłomiej Dach
52687fc37c Merge branch 'master' into fix-transform-mutation-loading-layer 2021-01-05 23:10:51 +01:00
Dean Herbert
54982dcdd7 Refactor LoadingLayer to avoid applying effects to external drawables
In theory this seemed like a good idea (and an optimisation in some
cases, due to lower fill rate), but in practice this leads to weird edge
cases.

This aims to do away with the operations on external drawables by
applying a dim to the area behind the `LoadingLayer` when required.
I went over each usage and ensured they look as good or better than
previously.

The specific bad usage here was the restoration of the colour on dispose
(if the `LoadingLayer` was disposed in a still-visible state).

I'm aware that the `BeatmapListingOverlay` will now dim completely during
load. I think this is fine for the time being.
2021-01-05 17:31:45 +09:00
Dean Herbert
ed6ffe2ef1 Remove hacky code 2021-01-05 14:54:59 +09:00
Dean Herbert
deb1ad7bca
Merge branch 'master' into disable-repeat-multi-actions 2021-01-04 23:38:29 +09:00
Salman Ahmed
485a57776b Fix hasBeatmap potentially checking on outdated DeletePending value 2021-01-04 10:28:41 +03:00
Salman Ahmed
ea38b00b29 Schedule all calls to updateBeatmapState() 2021-01-04 10:27:08 +03:00
Salman Ahmed
445a4bd01c Re-query beatmap info on database changes 2021-01-04 09:00:16 +03:00
Bartłomiej Dach
7d9a61fbc1 Handle unobserved exceptions from ready button properly 2020-12-31 11:57:13 +01:00
Bartłomiej Dach
f800448c87 Move game start logic to a higher level 2020-12-30 18:15:48 +01:00
Bartłomiej Dach
d34609b98e Rename On{ToggleReady -> ReadyClick} 2020-12-30 16:29:36 +01:00
Bartłomiej Dach
59f2017a13 Move BindValueChanged subscriptions to LoadComplete 2020-12-30 16:22:11 +01:00
Bartłomiej Dach
05f212eb3c Merge branch 'master' into remove-multiplayer-selection-poller 2020-12-29 12:51:33 +01:00
Bartłomiej Dach
cafa241ef3 Fix ready-up button getting stuck if server operation fails 2020-12-29 09:44:30 +01:00
Bartłomiej Dach
e9b0652359 Move ready-up operation logic again to client
To salvage ready up button tests.
2020-12-29 09:16:02 +01:00
Dean Herbert
906a9b79b5 Show an error when forcefully exiting online play due to API failure 2020-12-29 16:47:36 +09:00
Bartłomiej Dach
db52255bbe Adjust tracker usages to match new API 2020-12-29 08:20:43 +01:00
Bartłomiej Dach
f59ba799d3 Adjust operation tracker implementation 2020-12-29 07:54:27 +01:00
Bartłomiej Dach
9ff2140232 Move ready-up logic to match sub-screen 2020-12-29 07:52:15 +01:00