1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 18:47:27 +08:00
osu-lazer/osu.Game/Overlays
Bartłomiej Dach f239d03d75
Forcibly change ruleset to correct one before entering gameplay from main menu
Closes #25663 (again).

As it turns out, in some scenarios it can be the case that the current
game-global `Beatmap` is not valid for the current game-global
`Ruleset`. The validity of one and the other in conjunction is only
really validated by the song select screen; elsewhere there is no
guarantee that the global beatmap is playable using the global ruleset.

However, this only comes up in very specific circumstances, namely one:
when trying to autoplay a catch beatmap with osu! ruleset globally
active via the skin editor flow.

`Player` is responsible for retrieving the beatmap to be played. It does
so by invoking the appropriate beatmap converter and asking it if the
beatmap can be converted:

	6d64538d7a/osu.Game/Beatmaps/WorkingBeatmap.cs (L262-L266)

If the code above throws, `Player` actually silently covers for this, by
trying the beatmap's default ruleset instead:

	6d64538d7a/osu.Game/Screens/Play/Player.cs (L529-L536)

However, for the pairing of osu! ruleset and catch beatmap, this fails,
as `OsuBeatmapConverter`'s condition necessary for permitting conversion
is that the objects have a defined position:

	6d64538d7a/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapConverter.cs (L25)

which they will do, due to the fact that all catch beatmaps are really
just osu! beatmaps but with conversion steps applied, and thus `Player`
succeeds to load the catch beatmap in osu! ruleset.

In the skin editor scenario, this would lead to the secondary failure
of the skin editor trying to apply `CatchModAutoplay` on top of all
of that, which would fail at the hard-cast of the beatmap
to `CatchBeatmap`.
2023-12-06 10:35:41 +01:00
..
AccountCreation Automated pass 2023-06-24 01:00:03 +09:00
BeatmapListing Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
BeatmapSet Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
Changelog Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
Chat Fix chat overlay top bar icon being incorrect 2023-11-30 10:20:01 -08:00
Comments Fix comment markdown image not showing tooltips 2023-11-15 19:50:32 -08:00
Dashboard Merge branch 'master' into fix-spectator-quit-2 2023-11-27 11:36:10 +09:00
Dialog Use DangerousActionDialog 2023-12-05 16:54:44 +09:00
FirstRunSetup Fix dangerous buttons using different shades of pink 2023-10-13 13:16:24 +02:00
Login Duplicate sign out string for now 2023-07-03 00:14:26 +09:00
MedalSplash Partial everything 2022-11-27 00:00:27 +09:00
Mods Add protections against handling system mods in mod presets 2023-11-06 08:05:42 +01:00
Music Allow screens to change the ability to interact with the global track 2023-07-25 20:20:53 +09:00
News Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
Notifications Use less dodgy method of specifying allowable notification types 2023-10-13 10:31:00 +02:00
OSD Make "general" a common string 2023-09-05 23:00:07 -07:00
Profile Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
Rankings Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
Settings Add touch input settings to android 2023-11-09 14:52:15 +01:00
SkinEditor Forcibly change ruleset to correct one before entering gameplay from main menu 2023-12-06 10:35:41 +01:00
Toolbar Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
Volume Automated pass 2023-06-24 01:00:03 +09:00
Wiki Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
AccountCreationOverlay.cs Apply osu! side changes in line with FocusedOverlayContainer.PopIn abstract change 2023-06-18 20:57:32 +09:00
BeatmapListingOverlay.cs Uncomment net6.0 code and remove old code 2023-12-04 20:17:22 +01:00
BeatmapSetOverlay.cs Normalise overlay horizontal padding const 2023-04-02 20:24:13 -07:00
BreadcrumbControlOverlayHeader.cs Automated pass 2023-06-24 01:00:03 +09:00
ChangelogOverlay.cs Change some order and assert for positive visibility before scheduling an operation in changelog overlay 2023-01-24 17:59:25 +09:00
ChatOverlay.cs Merge branch 'master' into chat-drag-improvements 2023-11-24 18:13:18 +09:00
DashboardOverlay.cs Automated pass 2023-06-24 01:00:03 +09:00
DialogOverlay.cs Apply osu! side changes in line with FocusedOverlayContainer.PopIn abstract change 2023-06-18 20:57:32 +09:00
FirstRunSetupOverlay.cs Fix the MOTHERLOAD of undetected issues that are now visible thanks to net6.0 2022-12-16 18:16:26 +09:00
FullscreenOverlay.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
HoldToConfirmOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
IDialogOverlay.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
INamedOverlayComponent.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
INotificationOverlay.cs Flip and rename CompletedOrCancelled to Ongoing 2023-07-08 14:11:58 +02:00
IOverlayManager.cs Automated pass 2023-06-24 01:00:03 +09:00
KudosuTable.cs Add ability to view kudosu rankings 2023-11-07 15:58:17 -08:00
LoginOverlay.cs Reduce LoginOverlay pop-in/pop-out sample panning to match NowPlayingOverlay 2023-10-20 21:01:36 +09:00
MedalOverlay.cs Apply osu! side changes in line with FocusedOverlayContainer.PopIn abstract change 2023-06-18 20:57:32 +09:00
MusicController.cs Adjust xmldoc to explicitly metnion it only affects end user control 2023-07-30 13:52:58 +09:00
NewsOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
NotificationOverlay.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
NotificationOverlayToastTray.cs Expose all notifications from INotificationOverlay 2023-06-23 15:19:21 +09:00
NowPlayingOverlay.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
OnlineOverlay.cs Automated pass 2023-06-24 01:00:03 +09:00
OnScreenDisplay.cs Use new ArgumentNullException.ThrowIfNull throw-helper API 2022-12-22 21:27:59 +01:00
OverlayActivation.cs Remove redundant nullable suppression directives 2023-06-07 08:20:41 +03:00
OverlayColourProvider.cs Automated pass 2023-06-24 01:00:03 +09:00
OverlayHeader.cs Manual fixes to reduce warnings to zero 2023-06-24 01:52:53 +09:00
OverlayHeaderBackground.cs Automated pass 2023-06-24 01:00:03 +09:00
OverlayPanelDisplayStyleControl.cs Partial everything 2022-11-27 00:00:27 +09:00
OverlayRulesetSelector.cs Automated pass 2023-06-24 01:00:03 +09:00
OverlayRulesetTabItem.cs Automated pass 2023-06-24 01:00:03 +09:00
OverlayScrollContainer.cs Ensure scroll-to-top button is displayed above all overlay content 2023-05-17 15:42:38 +09:00
OverlaySidebar.cs Increase the minimum size of the scroll bar 2023-07-02 00:04:56 +09:00
OverlaySortTabControl.cs Add failing beatmap listing sort direction on criteria change test 2023-03-21 15:08:37 -07:00
OverlayStreamControl.cs Partial everything 2022-11-27 00:00:27 +09:00
OverlayStreamItem.cs Replace other hardcoded horizontal padding with const 2023-04-02 20:50:18 -07:00
OverlayTabControl.cs Partial everything 2022-11-27 00:00:27 +09:00
OverlayTitle.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
OverlayView.cs Partial everything 2022-11-27 00:00:27 +09:00
RankingsOverlay.cs Add ability to view kudosu rankings 2023-11-07 15:58:17 -08:00
RevertToDefaultButton.cs Change RevertToDefaultButton and BackButton to use Default sampleset instead 2023-10-20 21:01:36 +09:00
SettingsOverlay.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
SettingsPanel.cs Move behaviour to settings search text box only 2023-10-30 06:41:01 +03:00
SettingsSearchTextBox.cs Only run "select all on focus" behaviour on desktop platforms 2023-10-30 11:54:19 +03:00
SettingsSubPanel.cs Change RevertToDefaultButton and BackButton to use Default sampleset instead 2023-10-20 21:01:36 +09:00
SettingsToolboxGroup.cs Move hover logic to SettingsToolboxGroup to avoid expanded state clash 2023-01-17 14:43:22 +09:00
SortDirection.cs Remove redundant nullable suppression directives 2023-06-07 08:20:41 +03:00
TabbableOnlineOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
TabControlOverlayHeader.cs Manual fixes to reduce warnings to zero 2023-06-24 01:52:53 +09:00
UserProfileOverlay.cs Ensure only run once 2023-11-22 12:03:42 +09:00
VersionManager.cs Automated pass 2023-06-24 01:00:03 +09:00
VolumeOverlay.cs Partial everything 2022-11-27 00:00:27 +09:00
WaveOverlayContainer.cs Use string.Empty 2023-08-25 01:07:07 +09:00
WikiOverlay.cs Fix "Return to main page" link not working on wiki after error 2023-05-08 15:29:05 +09:00