osu/osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

39 lines
1.2 KiB
C#
Raw Normal View History

// 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.
2018-04-13 09:19:50 +00:00
2023-02-28 15:20:53 +00:00
using System;
using System.Linq;
2022-08-10 20:09:11 +00:00
using osu.Framework.Localisation;
using osu.Game.Rulesets.Mods;
2024-06-13 12:49:56 +00:00
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Taiko.Objects.Drawables;
2018-04-13 09:19:50 +00:00
namespace osu.Game.Rulesets.Taiko.Mods
{
2024-06-13 12:49:56 +00:00
public class TaikoModRelax : ModRelax, IApplicableToDrawableHitObject
{
2024-06-13 12:49:56 +00:00
public override LocalisableString Description => @"No need to remember which key is correct anymore!";
2023-02-28 15:20:53 +00:00
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(TaikoModSingleTap) }).ToArray();
2024-06-13 12:49:56 +00:00
public void ApplyToDrawableHitObject(DrawableHitObject drawable)
{
var allActions = Enum.GetValues<TaikoAction>();
drawable.HitObjectApplied += dho =>
{
switch (dho)
{
case DrawableHit hit:
hit.HitActions = allActions;
break;
case DrawableSwell swell:
swell.MustAlternate = false;
break;
}
};
}
}
}