mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 20:05:29 +08:00
Introduce multiplayer playability and free mod validity in Mod
This commit is contained in:
parent
1025e1939b
commit
d90a334853
@ -39,6 +39,18 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
bool UserPlayable { get; }
|
bool UserPlayable { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this mod is playable in a multiplayer match.
|
||||||
|
/// Should be <c>false</c> for mods that affect the gameplay progress based on user input (e.g. <see cref="ModAdaptiveSpeed"/>).
|
||||||
|
/// </summary>
|
||||||
|
bool PlayableInMultiplayer { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether this mod is valid to be a "free mod" in a multiplayer match.
|
||||||
|
/// Should be <c>false</c> for mods that affect the gameplay progress (e.g. <see cref="ModRateAdjust"/> and <see cref="ModTimeRamp"/>).
|
||||||
|
/// </summary>
|
||||||
|
bool ValidFreeModInMultiplayer { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a fresh <see cref="Mod"/> instance based on this mod.
|
/// Create a fresh <see cref="Mod"/> instance based on this mod.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -94,6 +94,12 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual bool UserPlayable => true;
|
public virtual bool UserPlayable => true;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public virtual bool PlayableInMultiplayer => UserPlayable;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public virtual bool ValidFreeModInMultiplayer => PlayableInMultiplayer;
|
||||||
|
|
||||||
[Obsolete("Going forward, the concept of \"ranked\" doesn't exist. The only exceptions are automation mods, which should now override and set UserPlayable to false.")] // Can be removed 20211009
|
[Obsolete("Going forward, the concept of \"ranked\" doesn't exist. The only exceptions are automation mods, which should now override and set UserPlayable to false.")] // Can be removed 20211009
|
||||||
public virtual bool Ranked => false;
|
public virtual bool Ranked => false;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user