mirror of
https://github.com/ppy/osu
synced 2025-01-04 13:22:08 +00:00
Added recommendations from bdach:
Fixed null checking in ApplyToDrawableHitObject Renamed mod to "Synesthesia" Moved to the "Fun" mod category
This commit is contained in:
parent
ed850196d9
commit
d07437f810
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// 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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Extensions.ObjectExtensions;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
@ -14,7 +13,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Mod that colours <see cref="HitObject"/>s based on the musical division they are on
|
/// Mod that colours <see cref="HitObject"/>s based on the musical division they are on
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OsuModSnapColour : ModSnapColour, IApplicableToBeatmap, IApplicableToDrawableHitObject
|
public class OsuModSynesthesia : ModSynesthesia, IApplicableToBeatmap, IApplicableToDrawableHitObject
|
||||||
{
|
{
|
||||||
private readonly OsuColour colours = new OsuColour();
|
private readonly OsuColour colours = new OsuColour();
|
||||||
|
|
||||||
@ -29,7 +28,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public void ApplyToDrawableHitObject(DrawableHitObject drawable)
|
public void ApplyToDrawableHitObject(DrawableHitObject drawable)
|
||||||
{
|
{
|
||||||
if (currentBeatmap.IsNull() || drawable.IsNull()) return;
|
if (currentBeatmap == null) return;
|
||||||
|
|
||||||
drawable.OnUpdate += _ =>
|
drawable.OnUpdate += _ =>
|
||||||
drawable.AccentColour.Value = BindableBeatDivisor.GetColourFor(
|
drawable.AccentColour.Value = BindableBeatDivisor.GetColourFor(
|
@ -176,7 +176,6 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
new OsuModClassic(),
|
new OsuModClassic(),
|
||||||
new OsuModRandom(),
|
new OsuModRandom(),
|
||||||
new OsuModMirror(),
|
new OsuModMirror(),
|
||||||
new OsuModSnapColour(),
|
|
||||||
new MultiMod(new OsuModAlternate(), new OsuModSingleTap())
|
new MultiMod(new OsuModAlternate(), new OsuModSingleTap())
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -205,7 +204,8 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
new MultiMod(new OsuModMagnetised(), new OsuModRepel()),
|
new MultiMod(new OsuModMagnetised(), new OsuModRepel()),
|
||||||
new ModAdaptiveSpeed(),
|
new ModAdaptiveSpeed(),
|
||||||
new OsuModFreezeFrame(),
|
new OsuModFreezeFrame(),
|
||||||
new OsuModBubbles()
|
new OsuModBubbles(),
|
||||||
|
new OsuModSynesthesia()
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.System:
|
case ModType.System:
|
||||||
|
@ -8,12 +8,12 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Mod that colours hitobjects based on the musical division they are on
|
/// Mod that colours hitobjects based on the musical division they are on
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ModSnapColour : Mod
|
public class ModSynesthesia : Mod
|
||||||
{
|
{
|
||||||
public override string Name => "Snap Colour";
|
public override string Name => "Synesthesia";
|
||||||
public override string Acronym => "SC";
|
public override string Acronym => "SY";
|
||||||
public override LocalisableString Description => "Colours hit objects based on the rhythm.";
|
public override LocalisableString Description => "Colours hit objects based on the rhythm.";
|
||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
public override ModType Type => ModType.Conversion;
|
public override ModType Type => ModType.Fun;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user