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

30517 Commits

Author SHA1 Message Date
Dean Herbert
46d2f305b5 Log chat polling rate changes 2022-01-13 17:31:59 +09:00
Dean Herbert
0bd34253e7 Increase chat polling rate during multiplayer lobby / games 2022-01-13 17:31:49 +09:00
Dean Herbert
2de0c34bc9 Reduce exposure of ChannelManager 2022-01-13 17:10:48 +09:00
Dean Herbert
c61419dfe5 Fix scores not using correct filename/display strings
I've updated all cases where we should have been using
`GetDisplayString()` anyway, but left the `ToString()` implementations
in place for safety. They should probably be removed in the future.
2022-01-13 16:56:11 +09:00
Dean Herbert
93c78253d6 Add synchronous fetch flow to BeatmapOnlineLookupQueue
The async flow doesn't work great with the realm import process. We
might be able to improve on this going forward, but for the time being
adding a synchronous path seems safest.

After all, we are already an an asynchronous (dedicated) thread pool at
this point.
2022-01-13 16:36:54 +09:00
Dean Herbert
bdb2979b2e Remove async from Populate method 2022-01-13 16:36:54 +09:00
Dean Herbert
70c107b434 Remove pointless override method in RealmArchiveModelManager 2022-01-13 16:27:12 +09:00
Dean Herbert
88145dedf1 Remove oudated comments 2022-01-13 15:27:43 +09:00
Dean Herbert
6025fe325d Fix filter criteria not being applied after carousel loads new beatmap sets 2022-01-13 15:08:51 +09:00
Dean Herbert
0a133c7e97 Fix typo in comment in IntroScreen 2022-01-13 13:47:23 +09:00
Dean Herbert
dcc354aa7c Fix deleted scores not being cleaned up on next startup 2022-01-13 13:40:09 +09:00
Dean Herbert
7a81fe19f6 Bump realm schema version to allow upgrades 2022-01-13 13:28:46 +09:00
Dean Herbert
b77cb344d5 Use ctor rather than MemberwiseClone to guarantee a safer clone of BeatmapDifficulty 2022-01-13 13:23:41 +09:00
Dean Herbert
86b2ac3217 Remove unnecessary Ruleset null check in BeatmapDifficultyCache 2022-01-13 13:19:49 +09:00
Dean Herbert
7baff18764 Add back PerformRead return safety by checking IsManaged status of returned data 2022-01-13 13:14:44 +09:00
Dean Herbert
085893c9b4 Fix stray bracket 2022-01-13 13:03:57 +09:00
Dean Herbert
65dd80e6f6 Sanitise mods / statistics cache logic in ScoreInfo 2022-01-13 12:59:16 +09:00
Dean Herbert
1a29098f3b Change default value and add comment explaining why skins are never "locally available" 2022-01-13 12:50:18 +09:00
Joseph Madamba
66773f6d7d Use comments to disable identifier typos instead 2022-01-12 15:49:28 -08:00
Joseph Madamba
5185f6010e Fix missed identifier typos 2022-01-12 15:46:20 -08:00
Joseph Madamba
b245ffefc1 Merge remote-tracking branch 'upstream/master' into fix-remaining-identifier-names 2022-01-12 15:05:07 -08:00
Bartłomiej Dach
afce976f08
Fix oversubscription to StartTimeBindable.ValueChanged 2022-01-12 19:29:49 +01:00
Bartłomiej Dach
07fc772c24
Merge branch 'master' into slider-paste-parsing-failures-2 2022-01-12 19:06:36 +01:00
Dean Herbert
4c79145c11 Fix potential mod nullref in APIUserScoreAggregate's CreateScoreInfo implementation 2022-01-13 00:28:16 +09:00
Dean Herbert
b2d09b7b10 Fix further warnings 2022-01-12 23:42:12 +09:00
Dean Herbert
51251e3204 Fix CI reported warnings 2022-01-12 22:39:00 +09:00
Dean Herbert
08da948afc
Merge branch 'master' into realm-integration/score-and-beatmaps 2022-01-12 19:22:55 +09:00
Dean Herbert
017f5a9b9b
Merge pull request #16430 from smoogipoo/less-harsh-mania-hp
Fix mania requiring PERFECTs to maintain HP
2022-01-12 19:07:13 +09:00
Dean Herbert
8c8c5f4c33 Fix skin hash repopulation not working since realm migration 2022-01-12 18:32:51 +09:00
Dan Balasescu
4106ebf881 Fix mania requiring PERFECTs to maintain HP 2022-01-12 18:29:23 +09:00
Dean Herbert
ef0f794fd6 Remove stay newline 2022-01-12 18:13:14 +09:00
Dean Herbert
eb70a1eeb7 Replace compatibility properties with direct references 2022-01-12 18:13:14 +09:00
Dean Herbert
482cf29e28
Merge branch 'master' into realm-integration/score-and-beatmaps 2022-01-12 17:57:14 +09:00
Dean Herbert
e12025dd48 Cascade delete metadata when beatmaps are deleted 2022-01-12 17:49:11 +09:00
Dean Herbert
34aa1bf21d Sanitise and remove some usages of Detach which are no longer required 2022-01-12 17:49:11 +09:00
Dean Herbert
5f7365e8f3 Ensure scores are cleaned up alongside beatmap so they don't have a null reference 2022-01-12 17:49:11 +09:00
Dean Herbert
f24b2b1be3 Make copying detached changes to realm only exposed for BeatmapSet
Also fixes remaining issues with the copy process.
2022-01-12 17:49:11 +09:00
Dean Herbert
a4de0f93fa Move manager Update methods to be explicit to where they are still used by legacy code
Also fixes skin hash repopulation being completely broken.
2022-01-12 17:49:11 +09:00
Dean Herbert
580ad03f8d Combine mapper configurations and add more explanation about special cases 2022-01-12 17:49:11 +09:00
Dean Herbert
51d6db1bca Add equatable support to IUser and RealmUser
Not sure this will stick, but let's add it for now to make testing
detach support work nicely.
2022-01-12 17:49:11 +09:00
Salman Ahmed
6db3c32dd1 Handle automapper realm cyclic references via AfterMaps
This may not be the cleanest solution, but there don't seem to be any
way towards this either.

- `UseDestinationValue` has been inherited by default as noted in
https://docs.automapper.org/en/stable/10.0-Upgrade-Guide.html#usedestinationvalue-is-now-inherited-by-default, and its behaviour in this case would be using the nested **managed** realm object for the destination member rather than creating an unmanaged version.

- `MaxDepth` already sets `PreserveReferences` so there's no point of using it.

- `MaxDepth` should probably not be set for all maps, only for those with
cyclic references, to avoid the expensive overhead of `PreserveReferences`, as mentioned in https://docs.automapper.org/en/stable/5.0-Upgrade-Guide.html#circular-references.

That aside, `MaxDepth` should actually only be set to `1` for
`BeatmapSetInfo` mapping, because we don't want AutoMapper to create a
nested instance of `BeatmapSetInfo` in each mapped/detached beatmap, but
for some reason, doing that will cause automapper to not map any beatmap
inside the set and leave it with 0 beatmaps.

While on the other hand, using `MaxDepth(2)` for `BeatmapSetInfo` works,
but creates an unused instance of a `BeatmapSetInfo` inside each mapped
beatmap, which may not be ideal.

For `BeatmapInfo`, it has to be `MaxDepth(2)`, in which the first
`BeatmapInfo` depth would be itself (when detaching a beatmap), and the
second would be nested beatmaps inside the mapped/detached
`BeatmapSetInfo` within the beatmap. (note that when detaching a beatmap
set, the unused instance of `BeatmapSetInfo` within each beatmap of that
beatmap set doesn't also have a list of unused beatmaps as one might expect from the depth specification, it surprisingly has 0 beatmaps)

This causes it to create an unused instance of `BeatmapInfo` in the beatmap set resembling the root mapped/detached beatmap, but that one might be inevitable.
2022-01-12 17:49:11 +09:00
Dean Herbert
dc3730f334 Fix song select import popup not always showing 2022-01-12 17:49:11 +09:00
Dean Herbert
017285b694 Update MusicController to handle deletions more correctly 2022-01-12 17:49:11 +09:00
Dean Herbert
157dfdaa82 Fix protected beatmap sets getting deleted 2022-01-12 17:49:11 +09:00
Dean Herbert
0aff1c232b Fix deleted/hidden carousel queries 2022-01-12 17:49:11 +09:00
Dean Herbert
72656ae01e Fix beatmap restore/undelete flows 2022-01-12 17:49:11 +09:00
Dean Herbert
46206f70d6 Fix beatmap mass deletion flow 2022-01-12 17:49:11 +09:00
Dean Herbert
d5239d550a Add refetch for non-managed hide/restore attempts 2022-01-12 17:49:11 +09:00
Dean Herbert
e0c59f4b3c Localise EF context factory usage to migration only 2022-01-12 17:49:11 +09:00
Dean Herbert
46e92c3b60 Clean up BeatmapManager query methods 2022-01-12 17:49:11 +09:00
Dean Herbert
9beabad6a4 Remove hide/restore event flow 2022-01-12 17:49:11 +09:00
Dean Herbert
c06b5951fd Fix multiple remaining warnings 2022-01-12 17:49:11 +09:00
Dean Herbert
e8dcbaf29a Fix intro screen hitting null reference if intro beatmap is unavailable 2022-01-12 17:49:11 +09:00
Dean Herbert
7dba3c3551 Fix most remaining test issues 2022-01-12 17:49:11 +09:00
Dean Herbert
b7ee6d1866 Add protections against test null refs when beatmap load fails 2022-01-12 17:49:11 +09:00
Dean Herbert
f986c3ebd4 Add basic write support via automapper 2022-01-12 17:49:11 +09:00
Dean Herbert
80eee6d7b0 Make RealmArchiveModelManager.Update work using automapper 2022-01-12 17:49:11 +09:00
Dean Herbert
7509a9ff8f Update BeatmapModelManager.Save to work for editor scenarios 2022-01-12 17:49:11 +09:00
Dean Herbert
8c3dc4333d Fix incorrect realm access after new beatmap import 2022-01-12 17:49:11 +09:00
Dean Herbert
64a47ff850 Allow RealmArchiveModelManager file operations to be performed on detached instances 2022-01-12 17:49:11 +09:00
Dean Herbert
2ce80cc030 Add back caching in WorkingBeatmapCache 2022-01-12 17:49:11 +09:00
Dean Herbert
286994a808 Fix BeatmapDifficulty cloning regression 2022-01-12 17:49:11 +09:00
Dean Herbert
58f8aae731 Fix one missed instance of GetResultSafely 2022-01-12 17:49:11 +09:00
Dean Herbert
f451560203 Update null allowances across beatmaps and scores 2022-01-12 17:49:11 +09:00
Dean Herbert
6033a825ed Ensure BeatmapInfo Difficulty and Metadata is non-null 2022-01-12 17:49:11 +09:00
Dean Herbert
a7958b1d31 Fix edge cases in online availability tracker and combine query code 2022-01-12 17:49:10 +09:00
Dean Herbert
c15efaeff2 Fix OnlinePlayBeatmapAvailabilityTracker not correctly tracking beatmap import changes 2022-01-12 17:49:10 +09:00
Dean Herbert
b531cd0207 Fix donwload trackers not considering deleted scores 2022-01-12 17:49:10 +09:00
Dean Herbert
902dc0eaec Detach rather than consume live when presenting a beatmap 2022-01-12 17:49:10 +09:00
Dean Herbert
5cbd731864 Add RulesetInfo hashcode implementation and tidy up equality 2022-01-12 17:49:10 +09:00
Dean Herbert
c33e163178 Bind ruleset to toolbar later for safety 2022-01-12 17:49:10 +09:00
Dean Herbert
02d0ca2741 Fix protected beatmaps showing up in the song select carousel 2022-01-12 17:49:10 +09:00
Dean Herbert
41d90cd0b5 Fix beatmap carousel test failures 2022-01-12 17:49:10 +09:00
Dean Herbert
a0f8debafe Add note about BeatmapMetadata.Author being weird 2022-01-12 17:49:10 +09:00
Dean Herbert
f4a1fa85a1 Fix incorrect conditional for deciding whether scores can be deleted from UI 2022-01-12 17:49:10 +09:00
Dean Herbert
ae8f522c20 Add support for persisting score's mods to realm 2022-01-12 17:49:10 +09:00
Dean Herbert
d8e75a9de4 Reimplmeent IsAvailableLocally as an abstract method 2022-01-12 17:49:10 +09:00
Dean Herbert
47390d7ec3 Update handling of ruleset nullability when handling a game-wide change 2022-01-12 17:49:10 +09:00
Dean Herbert
ba62d2c756 Fix ScoreInfo oversights causing automapper to fail
Parameter in ctor *has* to be named `realmUser` else automapper will try
to map to the `User` property.
2022-01-12 17:48:49 +09:00
Dan Balasescu
52e240230b
Merge branch 'master' into mouse-button-disable-disables-touch 2022-01-12 17:14:39 +09:00
Dean Herbert
83ccbc1d13 Mention safety failures of Beatmap/Score constructors 2022-01-12 17:00:17 +09:00
Dean Herbert
c831e9107a Fix BeatmapInfo.Clone potentially not cloning if already detached 2022-01-12 17:00:17 +09:00
Dean Herbert
5dd0bb1218 Ensure Score created by GameplayState has a valid ruleset 2022-01-12 17:00:17 +09:00
Dean Herbert
82259ee072 Improve legibility of RulesetInfo.Equals 2022-01-12 17:00:17 +09:00
Dean Herbert
e5af673b01 Fix incorrect BeatmapInfo.ToString implementation 2022-01-12 17:00:17 +09:00
Dean Herbert
a3c70ccdfc Fix OnlineAvailabilityTracker referencing a value in query that could potentially be null 2022-01-12 17:00:17 +09:00
Dean Herbert
b619ff1264 Reattach detached items on delete/undelete 2022-01-12 17:00:17 +09:00
Dean Herbert
e74a5022c9 Fix multiple tests via null checks and changing ToLive to Detach
flow
2022-01-12 17:00:17 +09:00
Dean Herbert
13401a8846 Better handle Statistics to avoid losing data 2022-01-12 17:00:17 +09:00
Dean Herbert
76670a8faa Fix BeatmapDifficultyCache not working with detached beatmaps 2022-01-12 17:00:17 +09:00
Dean Herbert
6919df18fa Fix incorrect ordering and grouping of difficulties at song select 2022-01-12 17:00:17 +09:00
Dean Herbert
aaefd72c69 Handle ignored mappings locally in Detach configuration 2022-01-12 17:00:17 +09:00
Dean Herbert
2b8706b6ce Detach and reattach scores to make work 2022-01-12 17:00:16 +09:00
Dean Herbert
60d2de8a3b Fix potential nullref when song select filters to no results 2022-01-12 17:00:16 +09:00
Dean Herbert
2d2faa72a9 Fix rulesets being out of order 2022-01-12 17:00:16 +09:00
Dean Herbert
e1f77b87de "Fix" OnlinePlayBeatmapAvailabilityTracker 2022-01-12 17:00:16 +09:00
Dean Herbert
de3a338d02 Update realm queries to use Filter to allow for indirect property filtering 2022-01-12 17:00:16 +09:00
Dean Herbert
8461eaab46 BeatmapSetInfo detach support 2022-01-12 17:00:16 +09:00
Dean Herbert
de076678fe Fix some remaining test failures 2022-01-12 17:00:16 +09:00
Dean Herbert
3811bd8520 Fix some null inspections 2022-01-12 17:00:16 +09:00