mirror of
https://github.com/ppy/osu.git
synced 2026-05-19 03:11:23 +08:00
df1dc46603
TC is a mod that always increases difficulty and is quite similar to HD. Given we even have diffcalc/pp considerations for it it's time to move it to the category it belongs. This doesn't cover any other mods that might need reshuffling too because TC is the only one that has actual impact on difficulty-based leaderboards (as in pp) and some people are actively playing it for the difficulty increase and not just as a fun gimmick. After a quick search turns out it was difficulty increasing from the start but was moved to fun in review https://github.com/ppy/osu/pull/3569#discussion_r300085523 but I don't really agree with that. Also as far as I know multimods don't do anything anymore?.. I've put it into HD multimod for consistency, but can move it to be separate if you want Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
83 lines
3.2 KiB
C#
83 lines
3.2 KiB
C#
// 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.
|
|
|
|
using System;
|
|
using osu.Framework.Extensions.Color4Extensions;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Sprites;
|
|
using osu.Framework.Localisation;
|
|
using osu.Game.Graphics;
|
|
using osu.Game.Rulesets.Mods;
|
|
using osu.Game.Rulesets.Objects;
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
|
using osu.Game.Rulesets.Osu.Objects;
|
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
|
using osu.Game.Rulesets.Osu.Skinning.Default;
|
|
|
|
namespace osu.Game.Rulesets.Osu.Mods
|
|
{
|
|
public class OsuModTraceable : ModWithVisibilityAdjustment, IRequiresApproachCircles
|
|
{
|
|
public override string Name => "Traceable";
|
|
public override string Acronym => "TC";
|
|
public override IconUsage? Icon => OsuIcon.ModTraceable;
|
|
public override ModType Type => ModType.DifficultyIncrease;
|
|
public override LocalisableString Description => "Put your faith in the approach circles...";
|
|
public override double ScoreMultiplier => 1;
|
|
public override bool Ranked => true;
|
|
|
|
public override Type[] IncompatibleMods => new[] { typeof(IHidesApproachCircles), typeof(OsuModDepth) };
|
|
|
|
protected override bool IsFirstAdjustableObject(HitObject hitObject) => !(hitObject is Spinner || hitObject is SpinnerTick);
|
|
|
|
protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
|
|
{
|
|
}
|
|
|
|
protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state) => applyTraceableState(hitObject, state);
|
|
|
|
private void applyTraceableState(DrawableHitObject drawable, ArmedState state)
|
|
{
|
|
if (!(drawable is DrawableOsuHitObject))
|
|
return;
|
|
|
|
//todo: expose and hide spinner background somehow
|
|
|
|
switch (drawable)
|
|
{
|
|
case DrawableHitCircle circle:
|
|
// we only want to see the approach circle
|
|
applyCirclePieceState(circle, circle.CirclePiece);
|
|
break;
|
|
|
|
case DrawableSliderTail sliderTail:
|
|
applyCirclePieceState(sliderTail);
|
|
break;
|
|
|
|
case DrawableSliderRepeat sliderRepeat:
|
|
// show only the repeat arrow
|
|
applyCirclePieceState(sliderRepeat, sliderRepeat.CirclePiece);
|
|
break;
|
|
|
|
case DrawableSlider slider:
|
|
slider.Body.OnSkinChanged += () => applySliderState(slider);
|
|
applySliderState(slider);
|
|
break;
|
|
}
|
|
}
|
|
|
|
private void applyCirclePieceState(DrawableOsuHitObject hitObject, IDrawable? hitCircle = null)
|
|
{
|
|
var h = hitObject.HitObject;
|
|
using (hitObject.BeginAbsoluteSequence(h.StartTime - h.TimePreempt))
|
|
(hitCircle ?? hitObject).Hide();
|
|
}
|
|
|
|
private void applySliderState(DrawableSlider slider)
|
|
{
|
|
((PlaySliderBody)slider.Body.Drawable).AccentColour = slider.AccentColour.Value.Opacity(0);
|
|
((PlaySliderBody)slider.Body.Drawable).BorderColour = slider.AccentColour.Value;
|
|
}
|
|
}
|
|
}
|