2019-01-24 08:43:03 +00:00
|
|
|
|
// 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;
|
2018-01-09 04:41:57 +00:00
|
|
|
|
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
|
|
|
|
|
2018-01-09 04:41:57 +00:00
|
|
|
|
namespace osu.Game.Rulesets.Taiko.Mods
|
|
|
|
|
{
|
2024-06-13 12:49:56 +00:00
|
|
|
|
public class TaikoModRelax : ModRelax, IApplicableToDrawableHitObject
|
2018-01-09 04:41:57 +00:00
|
|
|
|
{
|
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;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
2018-01-09 04:41:57 +00:00
|
|
|
|
}
|
|
|
|
|
}
|