mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 16:12:54 +08:00
Traceable no longer inherits from OsuModHidden and is no longer multi mod
This commit is contained in:
parent
b63a7593eb
commit
5b4640d3ea
@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
public override string Description => @"Play with no approach circles and fading circles/sliders.";
|
||||
public override double ScoreMultiplier => 1.06;
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModTraceable) };
|
||||
private const double fade_in_duration_multiplier = 0.4;
|
||||
private const double fade_out_duration_multiplier = 0.3;
|
||||
|
||||
|
@ -3,8 +3,10 @@
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Framework.Bindables;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
@ -12,19 +14,25 @@ using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
internal class OsuModTraceable : OsuModHidden
|
||||
internal class OsuModTraceable : Mod, IReadFromConfig, IApplicableToDrawableHitObjects
|
||||
{
|
||||
public override string Name => "Traceable";
|
||||
public override string Acronym => "TC";
|
||||
public override IconUsage Icon => FontAwesome.Brands.SnapchatGhost;
|
||||
public override ModType Type => ModType.DifficultyIncrease;
|
||||
public override ModType Type => ModType.Fun;
|
||||
public override string Description => "Put your faith in the approach circles...";
|
||||
public override double ScoreMultiplier => 1;
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModeObjectScaleTween) };
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModHidden), typeof(OsuModeObjectScaleTween) };
|
||||
private Bindable<bool> increaseFirstObjectVisibility = new Bindable<bool>();
|
||||
|
||||
public override void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)
|
||||
public void ReadFromConfig(OsuConfigManager config)
|
||||
{
|
||||
foreach (var drawable in drawables.Skip(IncreaseFirstObjectVisibility.Value ? 1 : 0))
|
||||
increaseFirstObjectVisibility = config.GetBindable<bool>(OsuSetting.IncreaseFirstObjectVisibility);
|
||||
}
|
||||
|
||||
public void ApplyToDrawableHitObjects(IEnumerable<DrawableHitObject> drawables)
|
||||
{
|
||||
foreach (var drawable in drawables.Skip(increaseFirstObjectVisibility.Value ? 1 : 0))
|
||||
drawable.ApplyCustomUpdateState += ApplyTraceableState;
|
||||
}
|
||||
|
||||
@ -59,8 +67,10 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
ApplyHiddenState(drawable, state);
|
||||
case DrawableSpinner spinner:
|
||||
spinner.Disc.Hide();
|
||||
//spinner.Ticks.Hide(); // do they contribute to the theme? debatable
|
||||
spinner.Background.Hide();
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
|
||||
public override double ScoreMultiplier => 1;
|
||||
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModeObjectScaleTween) };
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModTraceable) };
|
||||
|
||||
protected virtual float StartScale => 1;
|
||||
|
||||
|
@ -111,7 +111,7 @@ namespace osu.Game.Rulesets.Osu
|
||||
new OsuModHardRock(),
|
||||
new MultiMod(new OsuModSuddenDeath(), new OsuModPerfect()),
|
||||
new MultiMod(new OsuModDoubleTime(), new OsuModNightcore()),
|
||||
new MultiMod(new OsuModHidden(), new OsuModTraceable()),
|
||||
new OsuModHidden(),
|
||||
new MultiMod(new OsuModFlashlight(), new OsuModBlinds()),
|
||||
};
|
||||
|
||||
@ -136,6 +136,7 @@ namespace osu.Game.Rulesets.Osu
|
||||
new OsuModWiggle(),
|
||||
new MultiMod(new OsuModGrow(), new OsuModDeflate()),
|
||||
new MultiMod(new ModWindUp<OsuHitObject>(), new ModWindDown<OsuHitObject>()),
|
||||
new OsuModTraceable(),
|
||||
};
|
||||
|
||||
default:
|
||||
|
@ -85,7 +85,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
var assistMods = instance.GetModsFor(ModType.Automation);
|
||||
|
||||
var noFailMod = easierMods.FirstOrDefault(m => m is OsuModNoFail);
|
||||
var hiddenMod = harderMods.OfType<MultiMod>().FirstOrDefault(m => m.Mods.Any(a => a is OsuModHidden));
|
||||
var hiddenMod = harderMods.FirstOrDefault(m => m is OsuModHidden);
|
||||
|
||||
var doubleTimeMod = harderMods.OfType<MultiMod>().FirstOrDefault(m => m.Mods.Any(a => a is OsuModDoubleTime));
|
||||
|
||||
@ -96,11 +96,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
|
||||
testSingleMod(noFailMod);
|
||||
testMultiMod(doubleTimeMod);
|
||||
testMultiMod(hiddenMod);
|
||||
testIncompatibleMods(easy, hardRock);
|
||||
testDeselectAll(easierMods.Where(m => !(m is MultiMod)));
|
||||
testMultiplierTextColour(noFailMod, modSelect.LowMultiplierColour);
|
||||
testMultiplierTextColour(hardRock, modSelect.HighMultiplierColour);
|
||||
testMultiplierTextColour(hiddenMod, modSelect.HighMultiplierColour);
|
||||
|
||||
testUnimplementedMod(autoPilotMod);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user