1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:03:13 +08:00

ModUsage.Solo -> ModUsage.User

This commit is contained in:
Salman Ahmed 2022-03-20 06:36:51 +03:00
parent f2248ecc08
commit 70e943fbcc
8 changed files with 8 additions and 8 deletions

View File

@ -63,7 +63,7 @@ namespace osu.Game.Overlays.BeatmapSet
return;
modsContainer.Add(new ModButton(new ModNoMod()));
modsContainer.AddRange(rulesetInstance.AllMods.Where(m => m.IsPlayable(ModUsage.Solo)).Select(m => new ModButton(m)));
modsContainer.AddRange(rulesetInstance.AllMods.Where(m => m.IsPlayable(ModUsage.User)).Select(m => new ModButton(m)));
modsContainer.ForEach(button =>
{

View File

@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Mods
public override double ScoreMultiplier => 1;
public override bool IsPlayable(ModUsage usage) => usage == ModUsage.Solo;
public override bool IsPlayable(ModUsage usage) => usage == ModUsage.User;
public override Type[] IncompatibleMods => new[] { typeof(ModRateAdjust), typeof(ModTimeRamp) };

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Mods
/// <summary>
/// In a solo gameplay session.
/// </summary>
Solo,
User,
/// <summary>
/// In a multiplayer match, as a required mod.

View File

@ -25,7 +25,7 @@ namespace osu.Game.Screens.OnlinePlay
public new Func<Mod, bool> IsValidMod
{
get => base.IsValidMod;
set => base.IsValidMod = m => m.HasImplementation && m.IsPlayable(ModUsage.Solo) && value(m);
set => base.IsValidMod = m => m.HasImplementation && m.IsPlayable(ModUsage.User) && value(m);
}
public FreeModSelectOverlay()

View File

@ -170,7 +170,7 @@ namespace osu.Game.Screens.OnlinePlay
/// </summary>
/// <param name="mod">The <see cref="Mod"/> to check.</param>
/// <returns>Whether <paramref name="mod"/> is a valid mod for online play.</returns>
protected virtual bool IsValidMod(Mod mod) => mod.HasImplementation && ModUtils.FlattenMod(mod).All(m => m.IsPlayable(ModUsage.Solo));
protected virtual bool IsValidMod(Mod mod) => mod.HasImplementation && ModUtils.FlattenMod(mod).All(m => m.IsPlayable(ModUsage.User));
/// <summary>
/// Checks whether a given <see cref="Mod"/> is valid for per-player free-mod selection.

View File

@ -188,7 +188,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
if (score.NewValue == null)
return;
if (score.NewValue.Mods.Any(m => !m.IsPlayable(ModUsage.Solo)))
if (score.NewValue.Mods.Any(m => !m.IsPlayable(ModUsage.User)))
return;
var hitEvents = score.NewValue.HitEvents;

View File

@ -48,7 +48,7 @@ namespace osu.Game.Screens.Play
// Token request construction should happen post-load to allow derived classes to potentially prepare DI backings that are used to create the request.
var tcs = new TaskCompletionSource<bool>();
if (Mods.Value.Any(m => !m.IsPlayable(ModUsage.Solo)))
if (Mods.Value.Any(m => !m.IsPlayable(ModUsage.User)))
{
handleTokenFailure(new InvalidOperationException("Non-user playable mod selected."));
return false;

View File

@ -146,7 +146,7 @@ namespace osu.Game.Screens.Ranking
if (Score != null)
{
// only show flair / animation when arriving after watching a play that isn't autoplay.
bool shouldFlair = player != null && Score.Mods.All(m => m.IsPlayable(ModUsage.Solo));
bool shouldFlair = player != null && Score.Mods.All(m => m.IsPlayable(ModUsage.User));
ScorePanelList.AddScore(Score, shouldFlair);
}