mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Merge branch 'master' into multiplayer-disable-adaptive-speed
This commit is contained in:
@ -11,7 +11,7 @@ using osu.Game.Scoring;
|
||||
|
||||
namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
public abstract class ModAutoplay : Mod, IApplicableFailOverride, ICreateReplay
|
||||
public abstract class ModAutoplay : Mod, IApplicableFailOverride, ICreateReplayData
|
||||
{
|
||||
public override string Name => "Autoplay";
|
||||
public override string Acronym => "AT";
|
||||
@ -26,10 +26,20 @@ namespace osu.Game.Rulesets.Mods
|
||||
|
||||
public override bool IsPlayable(ModUsage usage) => false;
|
||||
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModRelax), typeof(ModFailCondition), typeof(ModNoFail) };
|
||||
public override Type[] IncompatibleMods => new[] { typeof(ModCinema), typeof(ModRelax), typeof(ModFailCondition), typeof(ModNoFail) };
|
||||
|
||||
public override bool HasImplementation => GetType().GenericTypeArguments.Length == 0;
|
||||
|
||||
[Obsolete("Override CreateReplayData(IBeatmap, IReadOnlyList<Mod>) instead")] // Can be removed 20220929
|
||||
public virtual Score CreateReplayScore(IBeatmap beatmap, IReadOnlyList<Mod> mods) => new Score { Replay = new Replay() };
|
||||
|
||||
public virtual ModReplayData CreateReplayData(IBeatmap beatmap, IReadOnlyList<Mod> mods)
|
||||
{
|
||||
#pragma warning disable CS0618
|
||||
var replayScore = CreateReplayScore(beatmap, mods);
|
||||
#pragma warning restore CS0618
|
||||
|
||||
return new ModReplayData(replayScore.Replay, new ModCreatedUser { Username = replayScore.ScoreInfo.User.Username });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user