1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 13:27:23 +08:00
Commit Graph

31852 Commits

Author SHA1 Message Date
Dean Herbert
ac739c9dae Change PerformancePointsCounter resolution requirements to be required
All other similar UI components have required dependencies, so this is
mainly to bring things in line with expectations. I am using this fact
in the skin editor to only show components which can be used in the
current editor context (by `try-catch`ing their
`Activator.CreateInstance`).
2022-03-17 14:56:35 +09:00
Salman Ahmed
7aae9bbd1b Improve channel bindable logic in ChatOverlay to avoid potential nullrefs 2022-03-17 08:31:38 +03:00
Dan Balasescu
e3cbde5099
Merge pull request #17282 from peppy/skin-editor-reset-position
Add "Reset position" menu item in skin editor
2022-03-17 14:20:24 +09:00
Dan Balasescu
e8886e4c50
Merge pull request #17286 from frenzibyte/rewrite-mod-instantiation-method
Update mod instantiation utility method inline with `APIMod.ToMod` changes
2022-03-17 14:19:55 +09:00
Dan Balasescu
1eac0f41bf
Remove unused using 2022-03-17 13:44:54 +09:00
Dan Balasescu
07433d0540
Merge pull request #17278 from peppy/skin-editor-multiple-component-settings
Show settings for multiple skin components in a selection
2022-03-17 13:43:59 +09:00
Salman Ahmed
e0a06bf5d9 Update mod instantiation utility method inline with APIMod.ToMod changes 2022-03-17 06:28:10 +03:00
Salman Ahmed
83189d1f07 Revert "Update mod instantiaton utility method to no longer check for validity"
This reverts commit 1a04260807.
2022-03-17 06:24:55 +03:00
Salman Ahmed
1a04260807 Update mod instantiaton utility method to no longer check for validity 2022-03-17 05:51:12 +03:00
Bartłomiej Dach
b21fa78cbf
Move dependencies out of fields to BDL args where possible 2022-03-16 21:55:36 +01:00
Bartłomiej Dach
e577152d2a
Merge branch 'master' into skin-editor-borrowed-dependencies 2022-03-16 21:11:00 +01:00
Dean Herbert
38d15145ac
Merge branch 'master' into skin-editor-multiple-component-settings 2022-03-16 22:23:53 +09:00
Dean Herbert
6df36171b5 Merge branch 'master' into skin-editor-toolbox-ui 2022-03-16 22:21:10 +09:00
Dan Balasescu
7f65f6adcc
Merge branch 'master' into skin-editor-sidebars 2022-03-16 21:12:18 +09:00
Dan Balasescu
b9387c7ff1
Merge branch 'master' into skin-editor-scene-library 2022-03-16 20:42:30 +09:00
Dan Balasescu
7faa35950a
Merge pull request #17272 from peppy/skin-editor-hide-toolbar
Hide the game toolbar (and overlays) when entering the skin editor
2022-03-16 20:42:20 +09:00
Dean Herbert
7e52623645 Add "Reset position" menu item in skin editor 2022-03-16 20:02:52 +09:00
Dean Herbert
cc356bcfe4 Show components available for current screen only (using actual live dependencies) 2022-03-16 19:42:00 +09:00
Dean Herbert
b07ca87965 Merge branch 'skin-editor-toolbox-ui' into skin-editor-borrowed-dependencies 2022-03-16 19:38:28 +09:00
Dean Herbert
27122c17c9 Show settings for multiple components in a selection 2022-03-16 19:35:45 +09:00
Dean Herbert
54e351efe9 Convert top level skin editor layout to use grid container
Fix `SkinEditor`'s initial target not being a `Screen`
2022-03-16 19:30:51 +09:00
Dean Herbert
4525ed645c Update skin editor to use EditorSidebar 2022-03-16 19:30:51 +09:00
Dean Herbert
59cb1ac126 Order components by name for now 2022-03-16 19:21:15 +09:00
Dean Herbert
e4a6b7ae91 Expand toolbox component items on hover 2022-03-16 19:21:15 +09:00
Dean Herbert
fdb411c0f3 Update skin editor toolbox design to suck less 2022-03-16 19:21:15 +09:00
Dean Herbert
b08d4bb8eb Move SceneLibrary implementation to its own file 2022-03-16 19:13:52 +09:00
Dean Herbert
ee3715f5cf Use OverlayColourProvider and adjust metrics to roughly match new designs 2022-03-16 19:13:52 +09:00
Dean Herbert
aff6a5a428 Better align scene selector with menu bar 2022-03-16 19:13:52 +09:00
Dean Herbert
c6aa32a003 Add basic song select setup for skinnability 2022-03-16 19:12:06 +09:00
Dean Herbert
8d85723a62 Split out SceneLibrary into its own component 2022-03-16 19:12:06 +09:00
Dean Herbert
d062810ff2 Add basic scene selector 2022-03-16 19:12:06 +09:00
Dean Herbert
c807ad7e4e Ensure toolbar is hidden even when the active screen is changed while the editor is open 2022-03-16 19:11:22 +09:00
Dean Herbert
86960c791f Close overlays and toolbar on entering the skin editor 2022-03-16 19:00:23 +09:00
Dean Herbert
99e3161cf0 Fix SkinEditor's initial target not being a Screen 2022-03-16 18:57:47 +09:00
Dean Herbert
603527d72d Fix potential crash when highlighting chat messages
Test failed locally in `TestPublicChannelMention`. This test seems to
specify that the same message may arrive twice with the same ID, so
rather than overthinking this one I propose we just use `FirstOrDefault`.

```csharp
TearDown : System.AggregateException : One or more errors occurred.
(Sequence contains more than one matching element)
  ----> System.InvalidOperationException : Sequence contains more than
one matching element
--TearDown
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean
includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,
CancellationToken cancellationToken)
   at osu.Framework.Extensions.TaskExtensions.WaitSafely(Task task)
   at osu.Framework.Testing.TestScene.checkForErrors()
--InvalidOperationException
   at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
   at System.Linq.Enumerable.TryGetSingle[TSource](IEnumerable`1 source,
Func`2 predicate, Boolean& found)
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1
source, Func`2 predicate)
   at
osu.Game.Overlays.Chat.DrawableChannel.<processMessageHighlighting>b__14_0()
in
/Users/dean/Projects/osu/osu.Game/Overlays/Chat/DrawableChannel.cs:line
102
   at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
```
2022-03-16 18:38:06 +09:00
Dan Balasescu
7e8aa77b2b
Merge pull request #17260 from peppy/editor-sidebar
Add `EditorSidebar` component
2022-03-16 18:20:18 +09:00
Dean Herbert
ba1642a680 Allow section headers to wrap 2022-03-16 17:19:08 +09:00
Dan Balasescu
d80830b415
Merge pull request #17226 from peppy/skin-component-settings
Allow skin components to have settings
2022-03-16 17:12:11 +09:00
Jai Sharma
e38d9eafa0 Use BindTarget instead of caching for ControlItem unread flow 2022-03-15 22:37:15 +00:00
Jai Sharma
49b74d7867 Use BindTarget instead of caching for ControlItem mentions bindable flow 2022-03-15 22:33:36 +00:00
Jai Sharma
481b8fe80b Use Orange1 for ControlItemMention background colour 2022-03-15 22:22:32 +00:00
Jai Sharma
7621e779fa Move ControlItem Action assignments into BDL 2022-03-15 22:19:58 +00:00
Dean Herbert
a0a033520f Rider no add licence headers 2022-03-15 16:48:14 +09:00
Dean Herbert
4ab5d6e3f0 Remove unnecessary FillFlowContainer from section 2022-03-15 16:47:08 +09:00
Dean Herbert
9e476ced63 Add EditorSidebar component 2022-03-15 16:38:00 +09:00
Dean Herbert
2b02a6555b Remove current screen check from skin editor changes 2022-03-15 15:40:26 +09:00
Dean Herbert
1814a325d8 Move GetSettingUnderlyingValue to a SettingSource extension method 2022-03-15 14:54:00 +09:00
Dean Herbert
6d5692fcec
Fix typo in setting name
Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
2022-03-15 14:25:05 +09:00
Dean Herbert
6fb06d69cc
Merge branch 'master' into pp-counter-alloc-reduction 2022-03-15 13:31:57 +09:00
Dean Herbert
deb4aeb4b2
Merge pull request #17242 from smoogipoo/performance-calculator-cleanup
Restructure PerformanceCalculator to not require ScoreInfo argument
2022-03-15 13:31:34 +09:00
Dan Balasescu
4ff6879b85 Fix incorrect copied room end dates 2022-03-15 11:30:57 +09:00
Dan Balasescu
ca62560495 Resolve inspections 2022-03-15 09:20:32 +09:00
Dan Balasescu
3a6d254d1f Add safeguards around incorrect ruleset sources 2022-03-15 09:20:32 +09:00
Jai Sharma
73a0373b4e Code quality fixes 2022-03-14 21:56:56 +00:00
Jai Sharma
ec61b88ec2 Adjust ControlItem padding 2022-03-14 21:39:57 +00:00
Jai Sharma
75958bf270 Refactor ControlItemText to use bindable flow for unread state 2022-03-14 21:32:30 +00:00
Jai Sharma
b01a809d55 Refactor ControlItemMention to use bindable flow 2022-03-14 21:26:33 +00:00
Jai Sharma
1f0f6990f0 Use ColourProvider.Content1 for ControlItemText colour 2022-03-14 21:16:28 +00:00
Jai Sharma
3aa343b987 Use OsuColour.YellowLight for ControlItemMention background 2022-03-14 21:14:33 +00:00
Jai Sharma
9621ef9437 Use OsuColour.Red1 for ControlItemClose hover colour 2022-03-14 21:10:39 +00:00
Jai Sharma
e91af664ef Adjust ControlItemAvatar placeholder animation and colour 2022-03-14 20:37:54 +00:00
Jai Sharma
12472593cc Mark required dependencies as non-nullable 2022-03-14 20:14:04 +00:00
Jai Sharma
c0d82dfb41 Code quality fixes 2022-03-14 19:42:55 +00:00
Jai Sharma
39c30516d0 Implement ChannelControlItem for new chat design
Adds new component `ChannelControlItem` and it's child components to be
used as the clickable control in the new chat sidebar for joined
channels.

Has public properties `HasUnread` and `MentionCount` to control the
display of the channel having unread messages or mentions of the user.

Channel select/join requests are exposed via `OnRequestSelect` and
`OnRequestLeave` events respectively which should be handled by a parent
component.

Requires a cached `Bindable<Channel>` instance to be managed by a parent
component.

Requires a cached `OveralayColourScheme` instance to be provided by a
parent component.
2022-03-14 18:55:27 +00:00
Dean Herbert
e047413329
Merge pull request #17196 from frenzibyte/skinnable-welcome-intro
Add skinning support for "Welcome" intro sequence
2022-03-14 22:54:19 +09:00
Dean Herbert
8fdf2b13ac Update framework 2022-03-14 22:23:50 +09:00
Dean Herbert
8b3360d6d2 Merge branch 'master' into confine-host-cursor 2022-03-14 22:23:45 +09:00
Dean Herbert
163cd48bf6 Further metrics tweaking 2022-03-14 19:27:53 +09:00
Dean Herbert
e91b3ae5f1 Move constants closer to usages 2022-03-14 19:18:47 +09:00
Dean Herbert
6eed2c35a4 Adjust visual appearance of BarHitErrorMeter for easier reading 2022-03-14 19:16:38 +09:00
Dan Balasescu
e79bed8fbe Merge branch 'master' into skin-component-settings 2022-03-14 18:54:27 +09:00
Dan Balasescu
dc1e5a456a
Merge pull request #17244 from peppy/preload-sample-pools
Fix samples not being preloaded before gameplay starts
2022-03-14 18:53:42 +09:00
Dean Herbert
16ee6b5fc7 Remove IsLayered from GetHasCode implementation 2022-03-14 18:12:04 +09:00
Dan Balasescu
fd93b42630
Merge pull request #17217 from peppy/skin-editor-reload-on-scene-change
Refactor `SkinEditor` to support switching target screens without full reload
2022-03-14 18:02:01 +09:00
Dan Balasescu
75470730cc
Merge pull request #17218 from peppy/skin-editor-target-other-containers
Allow skin editor to target different target containers for placement purposes
2022-03-14 17:40:41 +09:00
Dean Herbert
3c5fda5f23 Add early exist if the target screen is no longer current 2022-03-14 17:24:31 +09:00
Dean Herbert
39d95aa8cf Add automatic preloading of sample pools at a Playfield level 2022-03-14 17:19:48 +09:00
Dean Herbert
4523393208 Remove IsLayered from LegacyHitSampleInfo comparison
The equality of samples is generally used to compare the sample
equality, not its full properties. For instance, we don't compare
`Volume` in the base implementation.

Having `IsLayered` here breaks actual usages of equality, ie. for
pooling purposes.
2022-03-14 17:19:48 +09:00
Dean Herbert
8676a2587c Add the ability for HitObjects to specify auxiliary samples 2022-03-14 17:19:48 +09:00
Dan Balasescu
028750936c Apply review suggestions 2022-03-14 17:10:37 +09:00
Dan Balasescu
8f9b72c2ee
Merge pull request #17239 from frenzibyte/storyboard-negative-scale
Fix drawable storyboard sprites not flipping origin on negative scale
2022-03-14 15:59:06 +09:00
Dan Balasescu
3fff7f4b7e Require ScoreProcessor to receive ruleset 2022-03-14 15:51:10 +09:00
Dan Balasescu
9cc7f70872 Nullable annotate classes 2022-03-14 15:38:00 +09:00
Dan Balasescu
926827207a Reduce calculator allocations in counter 2022-03-14 14:44:06 +09:00
Dan Balasescu
4a3e3aba65 Restructure PerformanceCalculator to not require ScoreInfo argument 2022-03-14 14:25:28 +09:00
Dan Balasescu
21beb8774d Change to lambda method 2022-03-14 13:54:54 +09:00
Dan Balasescu
4ae6cba080 Expose UseDevelopmentServer as virtual 2022-03-14 13:49:38 +09:00
Salman Ahmed
c1697c7621 Update DrawableStoryboardSprite to use helper method 2022-03-14 06:30:54 +03:00
Salman Ahmed
740a72e16d Share origin adjustment logic between storyboard sprite and animation 2022-03-14 05:44:34 +03:00
Salman Ahmed
9cf05080da Simplify conditionals to one XOR operations with comments 2022-03-14 04:40:35 +03:00
Salman Ahmed
0b8c89bfa8 Fix drawable storyboard sprites not flipping origin on negative scale 2022-03-14 03:50:12 +03:00
Salman Ahmed
c9d54834be Fix SkinnableSprites in storyboards not autosizing to their textures 2022-03-14 03:46:13 +03:00
Dean Herbert
7d2752185d Add disclaimer and adjust metrics of BigBlackBox 2022-03-13 17:03:25 +09:00
Dean Herbert
e4211104b0 Add new settings to the big black box 2022-03-13 17:03:25 +09:00
Dean Herbert
458136dfe7 Add BigBlackBox for skinning testing purposes 2022-03-13 17:03:25 +09:00
Dean Herbert
8d1ee28e67 Add settings modification UI to skin editor 2022-03-13 17:03:25 +09:00
Dean Herbert
c99397f75a Add the ability to add settings to skinnable elements 2022-03-13 17:03:25 +09:00
Dean Herbert
7a2a3528ef Merge branch 'skin-editor-reload-on-scene-change' into skin-component-settings 2022-03-13 17:03:23 +09:00
Dean Herbert
0a1e55e4eb Merge branch 'skin-editor-target-other-containers' into skin-component-settings 2022-03-13 17:03:22 +09:00
Dean Herbert
f95e753adb Rename double-container variable name 2022-03-13 16:10:06 +09:00
Dean Herbert
d1a9b88fe7
Fix typo in comment
Co-authored-by: Salman Ahmed <frenzibyte@gmail.com>
2022-03-13 16:05:45 +09:00
Salman Ahmed
53c57661c7 Move implementtaion detail to inline comment 2022-03-11 18:34:22 +03:00
Salman Ahmed
5b70139b33 Avoid running message highlight processing more than once 2022-03-11 18:32:49 +03:00
Salman Ahmed
cc87563d57
Merge branch 'master' into chat-mention-highlight 2022-03-11 17:51:22 +03:00
Dean Herbert
3db42dd772 Allow skin editor to target different target containers for placement purposes 2022-03-11 23:23:32 +09:00
Dean Herbert
9a1ade4f79 Refactor SkinEditor to support switching target screens without full reload 2022-03-11 23:08:40 +09:00
Susko3
ac55fea3c9 Confine the host cursor to area of 'everything' scaling container 2022-03-11 14:04:12 +01:00
Dean Herbert
32c7a023f8 Make OsuGame.ScreenChanged private and non-virtual
Just reducing complexity scope here.
2022-03-11 19:54:15 +09:00
Bartłomiej Dach
398af246a5
Merge branch 'master' into blueprint-container-selected-items-bind 2022-03-11 00:37:45 +01:00
Salman Ahmed
d07e3101ea Improve message highlight handling in DrawableChannel 2022-03-10 23:07:15 +03:00
Salman Ahmed
a31611bdec Improve channel switching flow in HighlightMessage 2022-03-10 23:07:15 +03:00
Salman Ahmed
8086f73451 Revert "Add functionality to switch to successfully joined channel"
This reverts commit c72e8a8b5e.
2022-03-10 23:07:15 +03:00
Salman Ahmed
5315ff794a Handle non-existing channels on message highlighting gracefully 2022-03-10 21:29:32 +03:00
Salman Ahmed
c72e8a8b5e Add functionality to switch to successfully joined channel 2022-03-10 21:28:38 +03:00
Salman Ahmed
8cbc8b944f Rescope scheduling and improve comment 2022-03-10 17:25:13 +03:00
Dean Herbert
68aedd63a7 Move SelectionHandler's SelectedItems binding to the base implementation
Until now it was up to each implementation to connect
`BlueprintContainer` to its `SelectionHandler`, which didn't make much
sense at all.
2022-03-10 23:22:19 +09:00
Dean Herbert
e31b174cc2
Merge pull request #17198 from smoogipoo/fix-beatmap-wedge-async-mutation
Fix beatmap wedge possibly applying transforms incorrectly and crashing
2022-03-10 23:12:58 +09:00
Dean Herbert
cee6a12d0b
Merge pull request #17199 from smoogipoo/fix-multiplayer-test-failures
Fix potential multiplayer crash with async disposal
2022-03-10 23:07:05 +09:00
Salman Ahmed
717ddbba4e Fix skin components toolbox not autosizing properly 2022-03-10 16:30:20 +03:00
Dan Balasescu
885cb3ce5b Add current screen checks for added safety 2022-03-10 20:03:02 +09:00
Dan Balasescu
2de7795844
Fix always rolling up from zero
Co-authored-by: Dean Herbert <pe@ppy.sh>
2022-03-10 19:59:05 +09:00
Dean Herbert
2d135e5be6 Explain purpose of Schedule call in MultiplayerPlayer.onResultsReady 2022-03-10 19:56:13 +09:00
Dean Herbert
d1f8fd01df
Merge pull request #17180 from jai-x/new-chat-channel-listing
Implement `ChannelListing` for new chat design
2022-03-10 19:27:58 +09:00
Dan Balasescu
dfe98c6536
Merge pull request #17162 from peppy/realm-offset-feedback-fix-2
Fix feedback from realm writes causing offset slider to jump around
2022-03-10 18:53:08 +09:00
Dan Balasescu
45d537ef72 Fix potential multiplayer crash with async disposal 2022-03-10 18:50:53 +09:00
Dan Balasescu
671d614c92 Fix beatmap wedge mutating transforms incorrectly 2022-03-10 17:54:33 +09:00
Dean Herbert
db5c2c15dc
Merge pull request #17164 from smoogipoo/scoreprocessor-rework
Rework ScoreProcessor score calculation methods to fix various issues
2022-03-10 16:48:58 +09:00
Dan Balasescu
c61397cc22 Fix whitespace/inspection 2022-03-10 16:22:27 +09:00
Dan Balasescu
13a4058efd
Merge pull request #17191 from peppy/fix-mod-conversion-exceptions
Change `ToMod` to return an `UnknownMod` rather than throw if a mod isn't available
2022-03-10 16:20:50 +09:00
Dan Balasescu
cf91353009 Merge branch 'master' into scoreprocessor-rework 2022-03-10 16:14:28 +09:00
Dean Herbert
46f2db1712 Move ChannelListingItem spacing into item so input is always handled by an item in the list
Without this change, there would be a couple of pixels between each list
item where nothing would be hovered. This is a pretty annoying UX which
we should be avoiding we possible.
2022-03-10 15:58:57 +09:00
Dean Herbert
1a187d4dec Add animation to checkbox when joning/leaving a channel 2022-03-10 15:54:42 +09:00
Dean Herbert
0155519343 Merge branch 'master' into new-chat-channel-listing 2022-03-10 15:49:06 +09:00
Dean Herbert
eaef27595c Also mark UnknownMod as not user-playable 2022-03-10 15:33:50 +09:00
Dean Herbert
03d7d1e6ca
Merge pull request #17195 from smoogipoo/classic-score-multiplier
Tune classic mod scaling per-ruleset
2022-03-10 14:32:52 +09:00
Dean Herbert
022dd88aef
Merge branch 'master' into chat-mention-highlight 2022-03-10 14:23:23 +09:00
Dan Balasescu
c17dba4948
Merge pull request #17193 from peppy/update-dependencies
Update dependencies
2022-03-10 12:26:13 +09:00
Salman Ahmed
2c1589e068 Add skinning support for "seeya" sample 2022-03-10 05:52:45 +03:00
Salman Ahmed
b8ee786d77 Add skinning support for "welcome" sample 2022-03-10 05:52:45 +03:00
Salman Ahmed
b38de6e580 Add skinning support for welcome sprite text 2022-03-10 05:52:43 +03:00
Dan Balasescu
c36badab4b Add per-ruleset score multipliers for classic scoring 2022-03-10 10:26:09 +09:00
Salman Ahmed
b25c37ce62 Instantiate highlight background container on animation
Also removes the necessity of scheduling as it actually never worked as
intended, `Scheduler` will still update even when the chat line is
masked away, and the animation will never be held anyways.

The new duration of the animation should be enough for long scrolls
either way.
2022-03-10 03:49:42 +03:00
Salman Ahmed
cf9671cafb Increase highlight delay to 1500ms 2022-03-10 02:50:15 +03:00
Salman Ahmed
80c0df6af5 Scroll chat line to channel center
We may eventually want that encapsulated within `ScrollIntoView`, as it
would also come in handy for `GameplayLeaderboard`.
2022-03-10 02:50:15 +03:00
Salman Ahmed
93cf93943f Schedule chat line highlight after children to handle non-loaded lines 2022-03-10 02:48:33 +03:00
Salman Ahmed
2d8983383a Revert newMessagesArrived changes and always schedule highlight
In the case a message arrives and the chat overlay is hidden, clicking
on the mention notification will not work as the `HighlightedMessage`
bindable callback will execute before the scheduled `newMessagesArrived`
logic (which was hanging since the message arrived until the chat
overlay became open because of the notification).

Simplify things by always scheduling the `HighlightedMessage` bindable
callback.
2022-03-10 01:11:27 +03:00
Jai Sharma
b67f9269f9 Remove NewChat namespace 2022-03-09 18:13:56 +00:00
Dean Herbert
94ff6a338f
Merge branch 'master' into scoreprocessor-rework 2022-03-09 23:04:18 +09:00
Dean Herbert
df500dec04
Merge pull request #17187 from smoogipoo/fix-playlist-copy
Fix unable to copy playlist rooms without first opening
2022-03-09 23:03:43 +09:00
Dean Herbert
5fb51b578f Update dependencies
Mainly for a `Clowd.Squirrel` bump to fix https://github.com/ppy/osu/discussions/17190.
2022-03-09 19:09:51 +09:00
Dean Herbert
02f44d7061 Merge branch 'master' into fix-mod-conversion-exceptions 2022-03-09 18:07:42 +09:00
Dean Herbert
2eb3365f46 Fix regressing issues when attempting to exit Player after an unsuccessful beatmap load 2022-03-09 17:57:58 +09:00
Dean Herbert
1ee0be5e39 Ensure gameplay can't start when an UnknownMod is present 2022-03-09 17:57:58 +09:00
Dean Herbert
0267aed846 Change ToMod to return an UnknownMod rather than throw if a mod isn't available
As seen by this kind of crash, having the `.ToMod` method throw can be
very problematic and also hidden (as it is used inside of models in
places where exceptions are not expected to occur).

Given there are tens of usages of this method, returning a placeholder
mod seems like a better idea than outright throwing.

```
 An unhandled has occurred.
 System.InvalidOperationException:
There is no mod in the ruleset (osu) matching the acronym AS.
 at osu.Game.Online.API.APIMod.ToMod(Ruleset ruleset) in /Users/dean/Projects/osu/osu.Game/Online/API/APIMod.cs:line 54
 at osu.Game.Scoring.ScoreInfo.<get_Mods>b__117_0(APIMod m) in /Users/dean/Projects/osu/osu.Game/Scoring/ScoreInfo.cs:line 193
 at System.Linq.Enumerable.SelectArrayIterator`2.ToArray()
 at osu.Game.Scoring.ScoreInfo.get_Mods() in /Users/dean/Projects/osu/osu.Game/Scoring/ScoreInfo.cs:line 193
 at osu.Game.Screens.Select.Leaderboards.BeatmapLeaderboard.<>c.<subscribeToLocalScores>b__40_2(ScoreInfo s) in /Users/dean/Projects/osu/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs:line 199
 at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
 at osu.Game.Database.RealmObjectExtensions.Detach[T](IEnumerable`1 items) in /Users/dean/Projects/osu/osu.Game/Database/RealmObjectExtensions.cs:line 180
 at osu.Game.Screens.Select.Leaderboards.BeatmapLeaderboard.<>c__DisplayClass40_0.<subscribeToLocalScores>g__localScoresChanged|1(IRealmCollection`1 sender, ChangeSet changes, Exception exception) in /Users/dean/Projects/osu/osu.Game/Screens/Select/Leaderboards/BeatmapLeaderboard.cs:line
209
 at Realms.RealmCollectionBase`1.Realms.INotifiable<Realms.NotifiableObjectHandleBase.CollectionChangeSet>.NotifyCallbacks(Nullable`1 changes, Nullable`1 exception)
 at Realms.NotifiableObjectHandleBase.NotifyObjectChanged(IntPtr managedHandle, IntPtr changes, IntPtr exception)
```
2022-03-09 17:57:55 +09:00
Dean Herbert
8bb07f83cd
Merge pull request #17054 from hlysine/mod-adaptive-speed
Implement Adaptive Speed mod
2022-03-09 17:56:34 +09:00
Dan Balasescu
4839bd8044
Notify if copying room fails
Co-authored-by: Dean Herbert <pe@ppy.sh>
2022-03-09 16:47:47 +09:00
Dean Herbert
520d2d6cfa Fix beatmap carousel panels accepting input while marked as not-visible
This is an issue as carousel panels manage their own animated state. If
they are marked as not-visible (done at a higher level, from filtering
or update pathways) but clicked while fading out, they will animate back
to a visible state but not be marked as visible.

No tests for this one as it's probably not worthwhile to test (and hard
to do so). Manual testing can be done with the following patch:

```diff
diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs
b/osu.Game/Screens/Select/BeatmapCarousel.cs
index c3d340ac61..3372242acc 100644
--- a/osu.Game/Screens/Select/BeatmapCarousel.cs
+++ b/osu.Game/Screens/Select/BeatmapCarousel.cs
@@ -255,7 +255,7 @@ private void
beatmapSetsChanged(IRealmCollection<BeatmapSetInfo> sender, ChangeS
             }

             foreach (int i in changes.NewModifiedIndices)
-                UpdateBeatmapSet(sender[i].Detach());
+                Scheduler.AddDelayed(() =>
                 UpdateBeatmapSet(sender[i].Detach()), 100, true);

             foreach (int i in changes.InsertedIndices)
                 UpdateBeatmapSet(sender[i].Detach());

```

- Enter gameplay and adjust beatmap offset then return to song select
  and click the flashing panel.
OR
- Enter editor and save then return to song select and click the
  flashing panel.

Closes https://github.com/ppy/osu/discussions/17171.
2022-03-09 16:08:52 +09:00
Dan Balasescu
b07a1e8d09 Fix unable to copy playlist rooms without first opening 2022-03-09 15:38:00 +09:00
Dan Balasescu
ad0ca5673a Fix avatar not clickable after watching replay 2022-03-09 14:39:02 +09:00
Dean Herbert
6bf436cd62 Only null the realm write task if it actually completed 2022-03-09 13:52:58 +09:00
Dean Herbert
affcf5180b
Merge pull request #17161 from smoogipoo/fix-listing-score-conversion
Fix scores not being recalculated in beatmap overlay
2022-03-09 13:32:45 +09:00
Dean Herbert
58aef25ad5
Merge pull request #17152 from bdach/mod-overlay/difficulty-multiplier
Implement difficulty multiplier display for new mod select design
2022-03-09 12:11:16 +09:00
Dan Balasescu
b3fd156f10
Merge pull request #17158 from peppy/realm-recover-from-newer-database-version
Add flow to allow recovery after running an older release (with a different realm database version)
2022-03-09 11:30:58 +09:00
Jai Sharma
7daa2d0ea4 Use correct fonts and colours in ChannelListingItem 2022-03-09 00:36:19 +00:00
Jai Sharma
7dd51a9c4a Reorder class attributes 2022-03-09 00:12:44 +00:00
Jai Sharma
a3477c3841 Implement ChannelListing for new chat design
Adds components `ChannelListing` and `ChannelListing` item with visual
test. Essentially a more simplified version of the existing
`ChannelSelectionOverlay` component.

Correctly implements `IFilterable` behaviour to filter child channel
items. Channel joined state is based on the underlying `Joined` bindable
of the `Channel` class.

Channel join/leave events are exposed via `OnRequestJoin` and
`OnRequestLeave` events which should be handled by parent component.

Requires a cached `OverlayColourScheme` instance to be provided by the
parent overlay component when added.
2022-03-08 22:30:58 +00:00
Dean Herbert
a2ef086c1f Fix potential crash on rare incorrect firing of skin dropdown update methods
As brought to light by https://gist.github.com/smoogipoo/56eda7ab56b9d1966556f2ca7a80a847.

There's a chance that the dropdown is not populated by the time
`updateSelectedSkinFromConfig` is fired via an external means (config
changes).
2022-03-09 01:08:13 +09:00
Dean Herbert
512536f5fe Fix unconditional null in Equals implementation 2022-03-08 23:25:51 +09:00
Dan Balasescu
6fd8b4d891 Safeguard method against invalid invocation 2022-03-08 22:30:44 +09:00
Dan Balasescu
f1c40bd9ed Rework GetScore() method signatures + implementations
Rename legacy-facing overload to mention as much
2022-03-08 22:30:44 +09:00
Dan Balasescu
a8e99f1a95 Calculate classic score using total basic hitobject count 2022-03-08 21:49:41 +09:00
Dan Balasescu
5b6b8d1fa9 Remove GetStandardisedScore() proxy method 2022-03-08 21:49:41 +09:00
Dan Balasescu
6654977a7b Add GetScore() overload with total hitobject count 2022-03-08 21:49:41 +09:00
Dan Balasescu
2c382bd1d9 Rename GetImmediateScore() as overload of GetScore() 2022-03-08 21:49:40 +09:00
Dean Herbert
c867068cae Update framework 2022-03-08 21:15:14 +09:00
Dean Herbert
da7c6f1772 Merge branch 'master' into chat-mention-highlight 2022-03-08 21:15:12 +09:00
Dan Balasescu
a352a140bc
Merge pull request #17157 from peppy/fix-statistics-json-serialisation
Fix incorrect serialisation of submitted scores
2022-03-08 20:20:31 +09:00
Dean Herbert
960b6528ca Ensure the value used during realm async write is the same as whe compared for equality 2022-03-08 19:36:23 +09:00
Dean Herbert
daa42584f4 Fix feedback from realm writes causing offset slider to jump around 2022-03-08 19:36:08 +09:00
Dan Balasescu
4603e082f5
Merge pull request #17160 from peppy/remove-unnecessary-user-submittable-score
Remove `user` from `SubmittableScore`
2022-03-08 19:34:47 +09:00
Dan Balasescu
f5cd967635 Fix scores not being recalculated in beatmap listing 2022-03-08 19:07:39 +09:00
Dean Herbert
b0f40d9e45 Remove user from SubmittableScore
This wasn't being used by osu-web, and included far too much unnecessary
data. Of note, `pp` and `ruleset_id` are also not strictly required, but
there's no harm in sending them so I've left them be for now.
2022-03-08 18:38:24 +09:00
Dean Herbert
6565c95b17 Remove unused variable 2022-03-08 18:19:54 +09:00
Dan Balasescu
a172fc6cb8 Add IsBasic() and IsTick() extensions on HitResult 2022-03-08 18:19:12 +09:00
Dean Herbert
0718a55ad0 Add flow to allow recovery after running an older release (with a different realm database version)
As brought up in https://github.com/ppy/osu/discussions/17148
2022-03-08 18:15:28 +09:00
Dean Herbert
589a40ca2d Add EnumMember naming to HitResult to allow for correct json serialisation 2022-03-08 17:58:37 +09:00
Dean Herbert
622ec53130 Fix BeatmapLeaderboard refreshing on unrelated changes to a beatmap 2022-03-08 14:50:47 +09:00
Dean Herbert
2a55c5e02e Add extension method to detect and isolate realm collection-level changes 2022-03-08 14:50:47 +09:00
Salman Ahmed
5e0882df8d Simplify message highlighting transforms 2022-03-08 04:00:11 +03:00
Salman Ahmed
d74064b94b Use Equals instead of reference equality operator 2022-03-08 03:56:27 +03:00
Salman Ahmed
f645869958 Update ChannelManager.CurrentChannel directly to handle non-loaded chat scenario
`currentChannel` gets instantiated once the chat overlay is open, while
`HighlightMessage` could be called while the chat overlay has never been
open.

This will all be rewritten with the new chat overlay design anyways, so
should be fine for now.
2022-03-08 03:42:18 +03:00
Salman Ahmed
f8e5570e41 Fix Message equality not passing on equal references 2022-03-08 03:20:20 +03:00
Salman Ahmed
7f47be4680 Refactor message highlighting logic to rely on a Channel data bindable 2022-03-08 03:19:37 +03:00
Salman Ahmed
5764c53c17 OpenChannelNotification -> HighlightMessageNotification 2022-03-08 03:16:07 +03:00
Salman Ahmed
22a2ef42c5 Check channel ID on message highlight using currentDrawableChannel 2022-03-08 01:22:47 +03:00
Bartłomiej Dach
643f68e844
Better annotate initial rolling counter value set 2022-03-07 23:11:20 +01:00
Bartłomiej Dach
019f4d965d
Show two decimal digits on mod multiplier rather than one 2022-03-07 22:55:55 +01:00
Bartłomiej Dach
c25d7a1c75
Use rolling counter for multiplier display 2022-03-07 22:50:51 +01:00
Bartłomiej Dach
78a3b5961e
Implement basic difficulty multiplier display 2022-03-07 22:50:51 +01:00
Dean Herbert
31d6c75f40 Merge branch 'master' into realm-property-watching 2022-03-07 13:53:17 +09:00