Skip to content

Change "cinema" mod to never fail #26080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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