mirror of
https://github.com/ppy/osu.git
synced 2024-12-13 05:22:54 +08:00
Fix some lingering inspections
This commit is contained in:
parent
d4251271d8
commit
ab458320c4
@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
||||
public bool FlipCatcherPlate { get; set; }
|
||||
|
||||
public TestSkin()
|
||||
: base(null)
|
||||
: base(null!)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
||||
|
||||
hitCircle.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
|
||||
|
||||
Child = new SkinProvidingContainer(new TrianglesSkin(null))
|
||||
Child = new SkinProvidingContainer(new TrianglesSkin(null!))
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Child = drawableHitCircle = new DrawableHitCircle(hitCircle)
|
||||
|
@ -52,7 +52,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
|
||||
Lighting.Alpha = 0;
|
||||
|
||||
if (hitLightingEnabled && Lighting.Drawable != null)
|
||||
if (hitLightingEnabled)
|
||||
{
|
||||
// todo: this animation changes slightly based on new/old legacy skin versions.
|
||||
Lighting.ScaleTo(0.8f).ScaleTo(1.2f, 600, Easing.Out);
|
||||
|
@ -308,7 +308,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
|
||||
new Color4(255, 177, 140, 255),
|
||||
new Color4(100, 100, 100, 255), // alpha is specified as 100, but should be ignored.
|
||||
};
|
||||
Assert.AreEqual(expectedColors.Length, comboColors.Count);
|
||||
Assert.AreEqual(expectedColors.Length, comboColors?.Count);
|
||||
for (int i = 0; i < expectedColors.Length; i++)
|
||||
Assert.AreEqual(expectedColors[i], comboColors[i]);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ namespace osu.Game.Tests.Skins
|
||||
new Color4(100, 100, 100, 255), // alpha is specified as 100, but should be ignored.
|
||||
};
|
||||
|
||||
Assert.AreEqual(expectedColors.Count, comboColors.Count);
|
||||
Assert.AreEqual(expectedColors.Count, comboColors?.Count);
|
||||
for (int i = 0; i < expectedColors.Count; i++)
|
||||
Assert.AreEqual(expectedColors[i], comboColors[i]);
|
||||
}
|
||||
@ -49,7 +49,7 @@ namespace osu.Game.Tests.Skins
|
||||
var comboColors = decoder.Decode(stream).ComboColours;
|
||||
var expectedColors = SkinConfiguration.DefaultComboColours;
|
||||
|
||||
Assert.AreEqual(expectedColors.Count, comboColors.Count);
|
||||
Assert.AreEqual(expectedColors.Count, comboColors?.Count);
|
||||
for (int i = 0; i < expectedColors.Count; i++)
|
||||
Assert.AreEqual(expectedColors[i], comboColors[i]);
|
||||
}
|
||||
|
@ -146,7 +146,8 @@ namespace osu.Game.Tests.Skins
|
||||
AddStep("Disallow default colours fallback in beatmap skin", () => beatmapSource.Configuration.AllowDefaultComboColoursFallback = false);
|
||||
|
||||
AddAssert("Check retrieved combo colours from user skin", () =>
|
||||
requester.GetConfig<GlobalSkinColours, IReadOnlyList<Color4>>(GlobalSkinColours.ComboColours)?.Value?.SequenceEqual(userSource.Configuration.ComboColours) ?? false);
|
||||
userSource.Configuration.ComboColours != null &&
|
||||
(requester.GetConfig<GlobalSkinColours, IReadOnlyList<Color4>>(GlobalSkinColours.ComboColours)?.Value?.SequenceEqual(userSource.Configuration.ComboColours) ?? false));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -9,6 +9,7 @@ using JetBrains.Annotations;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Audio;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -175,7 +176,7 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
if (CurrentSkin != null)
|
||||
if (CurrentSkin.IsNotNull())
|
||||
CurrentSkin.SourceChanged -= skinChangedImmediate;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user