Hide ResumeOverlay when OsuModAutopilot is enabled

This commit is contained in:
Pasi4K5 2023-01-22 03:44:59 +01:00
parent 292fd345bc
commit 75a1a2ec2f
3 changed files with 7 additions and 1 deletions

View File

@ -23,6 +23,7 @@ namespace osu.Game.Rulesets.Osu.Mods
public override ModType Type => ModType.Automation;
public override LocalisableString Description => @"Automatic cursor movement - just follow the rhythm.";
public override double ScoreMultiplier => 0.1;
public override bool HidesResumeOverlay => true;
public override Type[] IncompatibleMods => new[] { typeof(OsuModSpunOut), typeof(ModRelax), typeof(ModFailCondition), typeof(ModNoFail), typeof(ModAutoplay), typeof(OsuModMagnetised), typeof(OsuModRepel) };
public bool PerformFail() => false;

View File

@ -107,6 +107,9 @@ namespace osu.Game.Rulesets.Mods
[JsonIgnore]
public virtual bool RequiresConfiguration => false;
[JsonIgnore]
public virtual bool HidesResumeOverlay => false;
/// <summary>
/// The mods this mod cannot be enabled with.
/// </summary>

View File

@ -230,7 +230,9 @@ namespace osu.Game.Rulesets.UI
public override void RequestResume(Action continueResume)
{
if (ResumeOverlay != null && (Cursor == null || (Cursor.LastFrameState == Visibility.Visible && Contains(Cursor.ActiveCursor.ScreenSpaceDrawQuad.Centre))))
if (ResumeOverlay != null
&& (Cursor == null || (Cursor.LastFrameState == Visibility.Visible && Contains(Cursor.ActiveCursor.ScreenSpaceDrawQuad.Centre)))
&& Mods.All(mod => !mod.HidesResumeOverlay))
{
ResumeOverlay.GameplayCursor = Cursor;
ResumeOverlay.ResumeAction = continueResume;