mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 10:33:07 +08:00
ModUsage.Solo
-> ModUsage.User
This commit is contained in:
parent
f2248ecc08
commit
70e943fbcc
@ -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 =>
|
||||
{
|
||||
|
@ -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) };
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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()
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user