Rename multiplayer mod usages to make more sense

This commit is contained in:
Salman Ahmed
2022-03-20 13:12:24 +03:00
parent 820a672940
commit add9f3ec91
6 changed files with 15 additions and 13 deletions

View File

@ -39,8 +39,8 @@ namespace osu.Game.Rulesets.Mods
/// <remarks>
/// <list type="bullet">
/// <item>Should be always <c>false</c> for cases where the user is not interacting with the game.</item>
/// <item>Should be <c>false</c> in <see cref="ModUsage.MultiplayerRequired"/> for mods that make gameplay duration dependent on user input (e.g. <see cref="ModAdaptiveSpeed"/>).</item>
/// <item>Should be <c>false</c> in <see cref="ModUsage.MultiplayerFree"/> for mods that affect the gameplay duration (e.g. <see cref="ModRateAdjust"/> and <see cref="ModTimeRamp"/>).</item>
/// <item>Should be <c>false</c> in <see cref="ModUsage.MultiplayerRoomWide"/> for mods that make gameplay duration dependent on user input (e.g. <see cref="ModAdaptiveSpeed"/>).</item>
/// <item>Should be <c>false</c> in <see cref="ModUsage.MultiplayerPerPlayer"/> for mods that affect the gameplay duration (e.g. <see cref="ModRateAdjust"/> and <see cref="ModTimeRamp"/>).</item>
/// </list>
/// </remarks>
/// <param name="usage">The mod usage.</param>

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Mods
{
public abstract class ModRateAdjust : Mod, IApplicableToRate
{
public override bool IsPlayable(ModUsage usage) => usage != ModUsage.MultiplayerFree;
public override bool IsPlayable(ModUsage usage) => usage != ModUsage.MultiplayerPerPlayer;
public abstract BindableNumber<double> SpeedChange { get; }

View File

@ -30,7 +30,7 @@ namespace osu.Game.Rulesets.Mods
[SettingSource("Adjust pitch", "Should pitch be adjusted with speed")]
public abstract BindableBool AdjustPitch { get; }
public override bool IsPlayable(ModUsage usage) => usage != ModUsage.MultiplayerFree;
public override bool IsPlayable(ModUsage usage) => usage != ModUsage.MultiplayerPerPlayer;
public override Type[] IncompatibleMods => new[] { typeof(ModRateAdjust), typeof(ModAdaptiveSpeed) };

View File

@ -9,18 +9,20 @@ namespace osu.Game.Rulesets.Mods
public enum ModUsage
{
/// <summary>
/// Used for a per-user gameplay session. Determines whether the mod is playable by an end user.
/// Used for a per-user gameplay session.
/// Determines whether the mod is playable by an end user.
/// </summary>
User,
/// <summary>
/// Used as a "required mod" for a multiplayer match.
/// Used in multiplayer but must be applied to all users.
/// This is generally the case for mods which affect the length of gameplay.
/// </summary>
MultiplayerRequired,
MultiplayerRoomWide,
/// <summary>
/// Used as a "free mod" for a multiplayer match.
/// Used in multiplayer either at a room or per-player level (i.e. "free mod").
/// </summary>
MultiplayerFree,
MultiplayerPerPlayer,
}
}