1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 06:37:43 +08:00
osu-lazer/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 17:19:50 +08:00
2023-02-28 23:20:53 +08:00
using System;
using System.Linq;
2022-08-11 04:09:11 +08:00
using osu.Framework.Localisation;
using osu.Game.Rulesets.Mods;
2024-06-13 20:49:56 +08:00
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Taiko.Objects.Drawables;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Rulesets.Taiko.Mods
{
2024-06-13 20:49:56 +08:00
public class TaikoModRelax : ModRelax, IApplicableToDrawableHitObject
{
2024-06-13 20:49:56 +08:00
public override LocalisableString Description => @"No need to remember which key is correct anymore!";
2023-02-28 23:20:53 +08:00
public override Type[] IncompatibleMods => base.IncompatibleMods.Concat(new[] { typeof(TaikoModSingleTap) }).ToArray();
2024-06-13 20:49:56 +08: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;
}
};
}
}
}