Skip to content

Commit

Permalink
Merge pull request #26080 from peppy/cinema-no-fail
Browse files Browse the repository at this point in the history
Change "cinema" mod to never fail
  • Loading branch information
bdach authored Dec 23, 2023
2 parents 881a91e + 0cbf594 commit a011a1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions osu.Game/Rulesets/Mods/ModCinema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public virtual void ApplyToDrawableRuleset(DrawableRuleset<T> drawableRuleset)
}
}

public class ModCinema : ModAutoplay, IApplicableToHUD, IApplicableToPlayer
public class ModCinema : ModAutoplay, IApplicableToHUD, IApplicableToPlayer, IApplicableFailOverride
{
public override string Name => "Cinema";
public override string Acronym => "CN";
public override IconUsage? Icon => OsuIcon.ModCinema;
public override LocalisableString Description => "Watch the video without visual distractions.";

public override Type[] IncompatibleMods => base.IncompatibleMods.Append(typeof(ModAutoplay)).ToArray();
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(ModAutoplay), typeof(ModNoFail) }).ToArray();

public void ApplyToHUD(HUDOverlay overlay)
{
Expand All @@ -45,5 +45,9 @@ public void ApplyToPlayer(Player player)

player.BreakOverlay.Hide();
}

public bool PerformFail() => false;

public bool RestartOnFail => false;
}
}
2 changes: 1 addition & 1 deletion osu.Game/Rulesets/Mods/ModNoFail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public abstract class ModNoFail : Mod, IApplicableFailOverride, IApplicableToHUD
public override ModType Type => ModType.DifficultyReduction;
public override LocalisableString Description => "You can't fail, no matter what.";
public override double ScoreMultiplier => 0.5;
public override Type[] IncompatibleMods => new[] { typeof(ModFailCondition) };
public override Type[] IncompatibleMods => new[] { typeof(ModFailCondition), typeof(ModCinema) };

private readonly Bindable<bool> showHealthBar = new Bindable<bool>();

Expand Down

0 comments on commit a011a1e

Please sign in to comment.