Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove nullable disable annotation in mods for catch ruleset. #19249

2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch.Tests/Mods/CatchModMirrorTest.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Utils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Collections.Generic;
using NUnit.Framework;
using osu.Framework.Utils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using NUnit.Framework;
using osu.Game.Rulesets.Catch.Mods;
using osu.Game.Rulesets.Catch.Objects;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch.Tests/Mods/TestSceneCatchModRelax.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModAutoplay.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Collections.Generic;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Replays;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModCinema.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Collections.Generic;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModClassic.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Catch.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModDaycore.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Catch.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Linq;
using osu.Framework.Bindables;
using osu.Game.Beatmaps;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModDoubleTime.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Catch.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModEasy.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Catch.Mods
Expand Down
7 changes: 3 additions & 4 deletions osu.Game.Rulesets.Catch/Mods/CatchModFlashlight.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Rulesets.Catch.Objects;
Expand Down Expand Up @@ -37,9 +36,9 @@ public class CatchModFlashlight : ModFlashlight<CatchHitObject>

public override float DefaultFlashlightSize => 350;

protected override Flashlight CreateFlashlight() => new CatchFlashlight(this, playfield);
protected override Flashlight CreateFlashlight() => new CatchFlashlight(this, playfield.AsNonNull());

private CatchPlayfield playfield;
private CatchPlayfield? playfield;

public override void ApplyToDrawableRuleset(DrawableRuleset<CatchHitObject> drawableRuleset)
{
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModFloatingFruits.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Game.Rulesets.Catch.Objects;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModHalfTime.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Catch.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Mods;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Beatmaps;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModHidden.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Linq;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Catch.Objects;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModMirror.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Beatmaps;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModMuted.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Mods;

Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModNightcore.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Mods;

Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModNoFail.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Catch.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System;
using osu.Framework.Bindables;
using osu.Game.Rulesets.Mods;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModPerfect.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Catch.Mods
Expand Down
7 changes: 4 additions & 3 deletions osu.Game.Rulesets.Catch/Mods/CatchModRelax.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using System.Diagnostics;
using osu.Framework.Graphics;
using osu.Framework.Input;
using osu.Framework.Input.Bindings;
Expand All @@ -20,7 +19,7 @@ public class CatchModRelax : ModRelax, IApplicableToDrawableRuleset<CatchHitObje
{
public override string Description => @"Use the mouse to control the catcher.";

private DrawableRuleset<CatchHitObject> drawableRuleset;
private DrawableRuleset<CatchHitObject>? drawableRuleset;

public void ApplyToDrawableRuleset(DrawableRuleset<CatchHitObject> drawableRuleset)
{
Expand All @@ -29,6 +28,8 @@ public void ApplyToDrawableRuleset(DrawableRuleset<CatchHitObject> drawableRules

public void ApplyToPlayer(Player player)
{
Debug.Assert(drawableRuleset != null);

if (!drawableRuleset.HasReplayLoaded.Value)
drawableRuleset.Cursor.Add(new MouseInputHelper((CatchPlayfield)drawableRuleset.Playfield));
}
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Catch/Mods/CatchModSuddenDeath.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Catch.Mods
Expand Down