mirror of
https://github.com/ppy/osu.git
synced 2025-03-10 22:17:20 +08:00
Fix "use these mods" option applying to system mods
Closes https://github.com/ppy/osu/issues/32229.
This commit is contained in:
parent
abc4955e81
commit
d9a1dcf9b9
@ -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}")));
|
||||
|
@ -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}")));
|
||||
|
Loading…
x
Reference in New Issue
Block a user