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 taiko ruleset. #19419

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko.Tests/Mods/TaikoModTestScene.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Tests.Visual;

namespace osu.Game.Rulesets.Taiko.Tests.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko.Tests/Mods/TestSceneTaikoModHidden.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using System.Linq;
using NUnit.Framework;
using osu.Game.Rulesets.Taiko.Mods;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using NUnit.Framework;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.Taiko.Mods;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModAutoplay.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using System.Collections.Generic;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mods;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModCinema.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using System.Collections.Generic;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mods;
Expand Down
7 changes: 4 additions & 3 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModClassic.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// 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.

#nullable disable

using System.Diagnostics;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Rulesets.Taiko.UI;
Expand All @@ -12,7 +11,7 @@ namespace osu.Game.Rulesets.Taiko.Mods
{
public class TaikoModClassic : ModClassic, IApplicableToDrawableRuleset<TaikoHitObject>, IUpdatableByPlayfield
{
private DrawableTaikoRuleset drawableTaikoRuleset;
private DrawableTaikoRuleset? drawableTaikoRuleset;

public void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset)
{
Expand All @@ -25,6 +24,8 @@ public void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRules

public void Update(Playfield playfield)
{
Debug.Assert(drawableTaikoRuleset != null);

// Classic taiko scrolls at a constant 100px per 1000ms. More notes become visible as the playfield is lengthened.
const float scroll_rate = 10;

Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModDaycore.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Taiko.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModDifficultyAdjust.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Configuration;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModDoubleTime.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Taiko.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModEasy.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mods;

Expand Down
7 changes: 3 additions & 4 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModFlashlight.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// 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.

#nullable disable

using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Layout;
using osu.Game.Configuration;
Expand Down Expand Up @@ -38,9 +37,9 @@ public class TaikoModFlashlight : ModFlashlight<TaikoHitObject>

public override float DefaultFlashlightSize => 250;

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

private TaikoPlayfield playfield;
private TaikoPlayfield? playfield;

public override void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset)
{
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModHalfTime.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Taiko.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModHardRock.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mods;

Expand Down
7 changes: 4 additions & 3 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// 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.

#nullable disable

using System.Diagnostics;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
Expand Down Expand Up @@ -32,7 +31,7 @@ public class TaikoModHidden : ModHidden, IApplicableToDrawableRuleset<TaikoHitOb
/// </summary>
private const float fade_out_duration = 0.375f;

private DrawableTaikoRuleset drawableRuleset;
private DrawableTaikoRuleset? drawableRuleset;

public void ApplyToDrawableRuleset(DrawableRuleset<TaikoHitObject> drawableRuleset)
{
Expand All @@ -46,6 +45,8 @@ protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObjec

protected override void ApplyNormalVisibilityState(DrawableHitObject hitObject, ArmedState state)
{
Debug.Assert(drawableRuleset != null);

switch (hitObject)
{
case DrawableDrumRollTick:
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModMuted.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

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

Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModNightcore.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

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

Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModNoFail.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Taiko.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModPerfect.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Taiko.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModRandom.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using System;
using System.Linq;
using osu.Framework.Utils;
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModRelax.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Taiko.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModSuddenDeath.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Taiko.Mods
Expand Down
2 changes: 0 additions & 2 deletions osu.Game.Rulesets.Taiko/Mods/TaikoModSwap.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// 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.

#nullable disable

using System;
using System.Linq;
using osu.Game.Beatmaps;
Expand Down