1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-10 18:17:19 +08:00

Fix "use these mods" option applying to system mods

Closes https://github.com/ppy/osu/issues/32229.
This commit is contained in:
Bartłomiej Dach 2025-03-05 09:25:56 +01:00
parent abc4955e81
commit d9a1dcf9b9
No known key found for this signature in database
2 changed files with 9 additions and 2 deletions

View File

@ -453,7 +453,10 @@ namespace osu.Game.Online.Leaderboards
List<MenuItem> items = new List<MenuItem>();
if (Score.Mods.Length > 0 && songSelect != null)
items.Add(new OsuMenuItem("Use these mods", MenuItemType.Highlighted, () => songSelect.Mods.Value = Score.Mods));
{
// system mods should never be copied across regardless of anything.
items.Add(new OsuMenuItem("Use these mods", MenuItemType.Highlighted, () => songSelect.Mods.Value = Score.Mods.Where(m => m.Type != ModType.System).ToArray()));
}
if (Score.OnlineID > 0)
items.Add(new OsuMenuItem(CommonStrings.CopyLink, MenuItemType.Standard, () => clipboard?.SetText($@"{api.Endpoints.WebsiteUrl}/scores/{Score.OnlineID}")));

View File

@ -781,7 +781,11 @@ namespace osu.Game.Screens.SelectV2.Leaderboards
List<MenuItem> items = new List<MenuItem>();
if (score.Mods.Length > 0)
items.Add(new OsuMenuItem("Use these mods", MenuItemType.Highlighted, () => SelectedMods.Value = score.Mods.Where(m => IsValidMod.Invoke(m)).ToArray()));
{
// system mods should never be copied across regardless of anything.
items.Add(new OsuMenuItem("Use these mods", MenuItemType.Highlighted,
() => SelectedMods.Value = score.Mods.Where(m => IsValidMod.Invoke(m) && m.Type != ModType.System).ToArray()));
}
if (score.OnlineID > 0)
items.Add(new OsuMenuItem(CommonStrings.CopyLink, MenuItemType.Standard, () => clipboard?.SetText($@"{api.Endpoints.WebsiteUrl}/scores/{score.OnlineID}")));