osu/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
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
MedalSplash
Mods Add protections against handling system mods in mod presets 2023-11-06 08:05:42 +01:00
Music
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 Remove touch device toasts entirely 2023-11-06 10:54:32 +01: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
Wiki Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
AccountCreationOverlay.cs
BeatmapListingOverlay.cs Uncomment net6.0 code and remove old code 2023-12-04 20:17:22 +01:00
BeatmapSetOverlay.cs
BreadcrumbControlOverlayHeader.cs
ChangelogOverlay.cs
ChatOverlay.cs Merge branch 'master' into chat-drag-improvements 2023-11-24 18:13:18 +09:00
DashboardOverlay.cs
DialogOverlay.cs
FirstRunSetupOverlay.cs
FullscreenOverlay.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
HoldToConfirmOverlay.cs
IDialogOverlay.cs
INamedOverlayComponent.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
INotificationOverlay.cs
IOverlayManager.cs
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
MusicController.cs
NewsOverlay.cs
NotificationOverlay.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
NotificationOverlayToastTray.cs
NowPlayingOverlay.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
OnlineOverlay.cs
OnScreenDisplay.cs
OverlayActivation.cs
OverlayColourProvider.cs
OverlayHeader.cs
OverlayHeaderBackground.cs
OverlayPanelDisplayStyleControl.cs
OverlayRulesetSelector.cs
OverlayRulesetTabItem.cs
OverlayScrollContainer.cs
OverlaySidebar.cs
OverlaySortTabControl.cs
OverlayStreamControl.cs
OverlayStreamItem.cs
OverlayTabControl.cs
OverlayTitle.cs Replace all hexacon lookups with strongly typed properties 2023-11-24 13:17:39 +09:00
OverlayView.cs
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
SortDirection.cs
TabbableOnlineOverlay.cs
TabControlOverlayHeader.cs
UserProfileOverlay.cs Ensure only run once 2023-11-22 12:03:42 +09:00
VersionManager.cs
VolumeOverlay.cs
WaveOverlayContainer.cs
WikiOverlay.cs