mirror of https://github.com/ppy/osu
Mark "autoplay" and "cinema" mods as mutually exclusive
This commit is contained in:
parent
30fae452a4
commit
8d4356f23b
|
@ -26,7 +26,7 @@ public abstract class ModAutoplay : Mod, IApplicableFailOverride, ICreateReplay
|
|||
|
||||
public override bool UserPlayable => 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;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
|
@ -27,6 +29,8 @@ public class ModCinema : ModAutoplay, IApplicableToHUD, IApplicableToPlayer
|
|||
public override IconUsage? Icon => OsuIcon.ModCinema;
|
||||
public override string Description => "Watch the video without visual distractions.";
|
||||
|
||||
public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModAutoplay)).ToArray();
|
||||
|
||||
public void ApplyToHUD(HUDOverlay overlay)
|
||||
{
|
||||
overlay.ShowHud.Value = false;
|
||||
|
|
Loading…
Reference in New Issue