mirror of https://github.com/ppy/osu
Add `IHasNoTimedInputs` interface to scope change further
This commit is contained in:
parent
d1300f75c0
commit
247fa088db
|
@ -18,7 +18,7 @@
|
|||
|
||||
namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
public class OsuModRelax : ModRelax, IUpdatableByPlayfield, IApplicableToDrawableRuleset<OsuHitObject>, IApplicableToPlayer
|
||||
public class OsuModRelax : ModRelax, IUpdatableByPlayfield, IApplicableToDrawableRuleset<OsuHitObject>, IApplicableToPlayer, IHasNoTimedInputs
|
||||
{
|
||||
public override LocalisableString Description => @"You don't need to click. Give your clicking/tapping fingers a break from the heat of things.";
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
// 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.
|
||||
|
||||
namespace osu.Game.Rulesets.Mods
|
||||
{
|
||||
/// <summary>
|
||||
/// Denotes a mod which removes timed inputs from a ruleset which would usually have them.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This will be used, for instance, to omit showing offset calibration UI post-gameplay.
|
||||
/// </remarks>
|
||||
public interface IHasNoTimedInputs
|
||||
{
|
||||
}
|
||||
}
|
|
@ -184,7 +184,7 @@ private void scoreChanged(ValueChangedEvent<ScoreInfo?> score)
|
|||
if (score.NewValue == null)
|
||||
return;
|
||||
|
||||
if (score.NewValue.Mods.Any(m => !m.UserPlayable || m is ModRelax))
|
||||
if (score.NewValue.Mods.Any(m => !m.UserPlayable || m is IHasNoTimedInputs))
|
||||
return;
|
||||
|
||||
var hitEvents = score.NewValue.HitEvents;
|
||||
|
|
Loading…
Reference in New Issue