diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7b98a81c3a6d..bc79b5aea398 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,10 +16,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Restore Tools
run: dotnet tool restore
@@ -50,7 +50,7 @@ jobs:
exit $exit_code
- name: InspectCode
- uses: JetBrains/ReSharper-InspectCode@v0.11
+ uses: JetBrains/ReSharper-InspectCode@v0.12
with:
# this is WTF tier but if you don't specify *both* of these the defaults assume `build: true`
build: false
@@ -78,10 +78,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Compile
run: dotnet build -c Debug -warnaserror osu.Desktop.slnf
@@ -123,10 +123,10 @@ jobs:
distribution: microsoft
java-version: 11
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Install .NET workloads
run: dotnet workload install android
@@ -136,24 +136,19 @@ jobs:
build-only-ios:
name: Build only (iOS)
- runs-on: macos-15
+ runs-on: macos-26
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v6
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Install .NET Workloads
run: dotnet workload install ios
- # https://github.com/dotnet/macios/issues/19157
- # https://github.com/actions/runner-images/issues/12758
- - name: Use Xcode 16.4
- run: sudo xcode-select -switch /Applications/Xcode_16.4.app
-
- name: Build
run: dotnet build -c Debug osu.iOS.slnf
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 5c87d79000d5..781f6ed12b86 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -48,12 +48,12 @@ jobs:
- name: Set artifacts directory
id: artifactsPath
- run: echo "::set-output name=nuget_artifacts::${{github.workspace}}/artifacts"
+ run: echo "nuget_artifacts=${{github.workspace}}/artifacts" >> "$GITHUB_OUTPUT"
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Pack
run: |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5c68e18e838c..e73228573db6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -24,10 +24,10 @@ jobs:
distribution: microsoft
java-version: 17
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Install .NET Android workload
run: dotnet workload install android
@@ -89,7 +89,7 @@ jobs:
run: >
dotnet publish -c Release
osu.Android/osu.Android.csproj
- -f net8.0-android
+ -f net10.0-android
-p:Version=${{ steps.version.outputs.version }}
-p:ApplicationDisplayVersion=${{ steps.version.outputs.version }}
-p:ApplicationVersion=${{ github.run_number }}
@@ -104,7 +104,7 @@ jobs:
run: >
dotnet publish -c Release
osu.Android/osu.Android.csproj
- -f net8.0-android
+ -f net10.0-android
-p:Version=${{ steps.version.outputs.version }}
-p:ApplicationDisplayVersion=${{ steps.version.outputs.version }}
-p:ApplicationVersion=${{ github.run_number }}
@@ -113,7 +113,7 @@ jobs:
- name: Find APK
id: find_apk
run: |
- PUBLISH_DIR="osu.Android/bin/Release/net8.0-android/publish"
+ PUBLISH_DIR="osu.Android/bin/Release/net10.0-android/publish"
APK=$(find "$PUBLISH_DIR" -maxdepth 1 -name "*.apk" 2>/dev/null | head -1)
if [ -z "$APK" ]; then
APK=$(find osu.Android/bin/Release -name "*.apk" | head -1)
diff --git a/.github/workflows/report-nunit.yml b/.github/workflows/report-nunit.yml
index 9bc4d4de2032..3aff6d924cee 100644
--- a/.github/workflows/report-nunit.yml
+++ b/.github/workflows/report-nunit.yml
@@ -36,7 +36,7 @@ jobs:
github-token: ${{ github.token }}
- name: Annotate CI run with test results
- uses: dorny/test-reporter@v2.6.0
+ uses: dorny/test-reporter@v2
with:
name: Results
path: "*.trx"
diff --git a/.github/workflows/update-web-mod-definitions.yml b/.github/workflows/update-web-mod-definitions.yml
index 160872a9a114..1fc2f7b2e057 100644
--- a/.github/workflows/update-web-mod-definitions.yml
+++ b/.github/workflows/update-web-mod-definitions.yml
@@ -12,24 +12,24 @@ jobs:
name: Update osu-web mod definitions
runs-on: ubuntu-latest
steps:
- - name: Install .NET 8.0.x
- uses: actions/setup-dotnet@v4
+ - name: Install .NET 10.0.x
+ uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Checkout ppy/osu
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
path: osu
- name: Checkout ppy/osu-tools
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
repository: ppy/osu-tools
path: osu-tools
- name: Checkout ppy/osu-web
- uses: actions/checkout@v4
+ uses: actions/checkout@v6
with:
repository: ppy/osu-web
path: osu-web
@@ -47,7 +47,7 @@ jobs:
working-directory: ./osu-tools
- name: Create pull request with changes
- uses: peter-evans/create-pull-request@v6
+ uses: peter-evans/create-pull-request@v8
with:
title: Update mod definitions
body: "This PR has been auto-generated to update the mod definitions to match ppy/osu@${{ github.ref_name }}."
diff --git a/Directory.Build.props b/Directory.Build.props
index a856825d873e..607ee1ed9e33 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,7 +1,7 @@
- 12.0
+ 14.0
enable
false
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj
index 4fa8b9409900..b671686c89aa 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj
@@ -11,14 +11,14 @@
-
+
WinExe
- net8.0
+ net10.0
osu.Game.Rulesets.EmptyFreeform.Tests
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformDifficultyCalculator.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformDifficultyCalculator.cs
index 312d3d5e9a64..c16a181da6b8 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformDifficultyCalculator.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformDifficultyCalculator.cs
@@ -24,8 +24,8 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
return new DifficultyAttributes(mods, 0);
}
- protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Enumerable.Empty();
+ protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => [];
- protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => Array.Empty();
+ protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => [];
}
}
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs
index d7ef84541f32..80c5a195d487 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs
@@ -42,7 +42,7 @@ public override IEnumerable GetModsFor(ModType type)
return new[] { new EmptyFreeformModAutoplay() };
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj
index 89abd5665c1c..dc426146dad1 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
osu.Game.Rulesets.EmptyFreeform
Library
AnyCPU
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
index bb95c675fcf8..796f182a2561 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
@@ -11,14 +11,14 @@
-
+
WinExe
- net8.0
+ net10.0
osu.Game.Rulesets.Pippidon.Tests
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
index f6addab279e7..7e78a419976b 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
@@ -24,8 +24,8 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
return new DifficultyAttributes(mods, 0);
}
- protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Enumerable.Empty();
+ protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => [];
- protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => Array.Empty();
+ protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => [];
}
}
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
index 2f6ba0dda616..4a609cded856 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
@@ -36,7 +36,7 @@ public override IEnumerable GetModsFor(ModType type)
return new[] { new PippidonModAutoplay() };
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonCursorContainer.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonCursorContainer.cs
index 20dd2e7c31b1..445b8643b29e 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonCursorContainer.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonCursorContainer.cs
@@ -27,8 +27,7 @@ private void load(TextureStore textures)
{
cursorTexture = textures.Get("character");
- if (cursorSprite != null)
- cursorSprite.Texture = cursorTexture;
+ cursorSprite?.Texture = cursorTexture;
}
}
}
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
index 165b6b6c6b89..23a5a46c2ca3 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
osu.Game.Rulesets.Pippidon
Library
AnyCPU
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj
index fc170b2c24e3..2ff812335eac 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj
@@ -11,14 +11,14 @@
-
+
WinExe
- net8.0
+ net10.0
osu.Game.Rulesets.EmptyScrolling.Tests
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/Beatmaps/EmptyScrollingBeatmapConverter.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/Beatmaps/EmptyScrollingBeatmapConverter.cs
index 02fb9a9dd5d5..011b3f58a0e5 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/Beatmaps/EmptyScrollingBeatmapConverter.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/Beatmaps/EmptyScrollingBeatmapConverter.cs
@@ -4,8 +4,8 @@
using System.Collections.Generic;
using System.Threading;
using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.EmptyScrolling.Objects;
+using osu.Game.Rulesets.Objects;
namespace osu.Game.Rulesets.EmptyScrolling.Beatmaps
{
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingDifficultyCalculator.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingDifficultyCalculator.cs
index a4dc1762d520..13909470cc73 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingDifficultyCalculator.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingDifficultyCalculator.cs
@@ -24,8 +24,8 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
return new DifficultyAttributes(mods, 0);
}
- protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Enumerable.Empty();
+ protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => [];
- protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => Array.Empty();
+ protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => [];
}
}
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingRuleset.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingRuleset.cs
index a32586c4148e..7fc33acccb77 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingRuleset.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingRuleset.cs
@@ -9,10 +9,10 @@
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Rulesets.Difficulty;
-using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.EmptyScrolling.Beatmaps;
using osu.Game.Rulesets.EmptyScrolling.Mods;
using osu.Game.Rulesets.EmptyScrolling.UI;
+using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.EmptyScrolling
@@ -35,7 +35,7 @@ public override IEnumerable GetModsFor(ModType type)
return new[] { new EmptyScrollingModAutoplay() };
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/DrawableEmptyScrollingRuleset.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/DrawableEmptyScrollingRuleset.cs
index 99598fc1130a..68aff44c1b0e 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/DrawableEmptyScrollingRuleset.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/UI/DrawableEmptyScrollingRuleset.cs
@@ -7,11 +7,11 @@
using osu.Game.Beatmaps;
using osu.Game.Input.Handlers;
using osu.Game.Replays;
-using osu.Game.Rulesets.Mods;
-using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.EmptyScrolling.Objects;
using osu.Game.Rulesets.EmptyScrolling.Objects.Drawables;
using osu.Game.Rulesets.EmptyScrolling.Replays;
+using osu.Game.Rulesets.Mods;
+using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj
index 6d9565a6f2ee..544abba0c004 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
osu.Game.Rulesets.EmptyScrolling
Library
AnyCPU
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
index bb95c675fcf8..796f182a2561 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
@@ -11,14 +11,14 @@
-
+
WinExe
- net8.0
+ net10.0
osu.Game.Rulesets.Pippidon.Tests
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
index f6addab279e7..7e78a419976b 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
@@ -24,8 +24,8 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
return new DifficultyAttributes(mods, 0);
}
- protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Enumerable.Empty();
+ protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => [];
- protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => Array.Empty();
+ protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => [];
}
}
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
index bde530feb8bb..582e0bc5b651 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
@@ -33,7 +33,7 @@ public override IEnumerable GetModsFor(ModType type)
return new[] { new PippidonModAutoplay() };
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
index 165b6b6c6b89..23a5a46c2ca3 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
osu.Game.Rulesets.Pippidon
Library
AnyCPU
diff --git a/build/PatchElfPageSize.targets b/build/PatchElfPageSize.targets
new file mode 100644
index 000000000000..0d78e82fc79d
--- /dev/null
+++ b/build/PatchElfPageSize.targets
@@ -0,0 +1,259 @@
+
+
+
+
+
+
+
+
+
+ 0 ? TargetPageSize : 0x4000; // 16 KB default
+
+if (!System.IO.File.Exists(FilePath))
+ return true;
+
+byte[] data = System.IO.File.ReadAllBytes(FilePath);
+
+// ── Validate ELF magic ──────────────────────────────────────────────
+if (data.Length < 64 || data[0] != 0x7F || data[1] != (byte)'E' || data[2] != (byte)'L' || data[3] != (byte)'F')
+ return true;
+
+int eiClass = data[4]; // 1 = 32-bit, 2 = 64-bit
+bool is64 = eiClass == 2;
+bool isLE = data[5] == 1;
+
+// Only 64-bit little-endian ELFs need 16 KB alignment (Android arm64/x64).
+if (!is64 || !isLE)
+ return true;
+
+// ── Helper lambdas ──────────────────────────────────────────────────
+System.Func RU64 = (b, o) =>
+ (ulong)b[o] | ((ulong)b[o+1] << 8) | ((ulong)b[o+2] << 16) | ((ulong)b[o+3] << 24) |
+ ((ulong)b[o+4] << 32) | ((ulong)b[o+5] << 40) | ((ulong)b[o+6] << 48) | ((ulong)b[o+7] << 56);
+
+System.Func RU32 = (b, o) =>
+ (uint)b[o] | ((uint)b[o+1] << 8) | ((uint)b[o+2] << 16) | ((uint)b[o+3] << 24);
+
+System.Action WU64 = (b, o, v) =>
+{
+ b[o] = (byte)(v); b[o+1] = (byte)(v >> 8);
+ b[o+2] = (byte)(v >> 16); b[o+3] = (byte)(v >> 24);
+ b[o+4] = (byte)(v >> 32); b[o+5] = (byte)(v >> 40);
+ b[o+6] = (byte)(v >> 48); b[o+7] = (byte)(v >> 56);
+};
+
+// ── Parse ELF header ────────────────────────────────────────────────
+ulong e_phoff = RU64(data, 32);
+ulong e_shoff = RU64(data, 40);
+int e_phentsize = (int)(data[54] | (data[55] << 8));
+int e_phnum = (int)(data[56] | (data[57] << 8));
+int e_shentsize = (int)(data[58] | (data[59] << 8));
+int e_shnum = (int)(data[60] | (data[61] << 8));
+
+// ── Collect LOAD segments ───────────────────────────────────────────
+const uint PT_LOAD = 1;
+bool alreadyAligned = true;
+var loadIndices = new System.Collections.Generic.List();
+
+for (int i = 0; i < e_phnum; i++)
+{
+ int hdr = (int)e_phoff + i * e_phentsize;
+ if (RU32(data, hdr) == PT_LOAD)
+ {
+ loadIndices.Add(i);
+ if (RU64(data, hdr + 48) < (ulong)pageSize)
+ alreadyAligned = false;
+ }
+}
+
+if (alreadyAligned)
+ return true;
+
+// ── Build a new file with proper padding ────────────────────────────
+var segInfos = new System.Collections.Generic.List>();
+foreach (int idx in loadIndices)
+{
+ int hdr = (int)e_phoff + idx * e_phentsize;
+ segInfos.Add(System.Tuple.Create(idx,
+ RU64(data, hdr + 8), // p_offset
+ RU64(data, hdr + 32), // p_filesz
+ RU64(data, hdr + 16) // p_vaddr
+ ));
+}
+segInfos.Sort((a, b) => a.Item2.CompareTo(b.Item2));
+
+var ms = new System.IO.MemoryStream(data.Length + pageSize * loadIndices.Count);
+int currentOld = 0;
+var deltas = new System.Collections.Generic.List>();
+
+foreach (var seg in segInfos)
+{
+ int oldOff = (int)seg.Item2;
+ ulong vaddr = seg.Item4;
+ int filesz = (int)seg.Item3;
+
+ if (oldOff > currentOld)
+ ms.Write(data, currentOld, oldOff - currentOld);
+
+ long newOff = ms.Position;
+ ulong requiredMod = vaddr % (ulong)pageSize;
+ ulong currentMod = (ulong)newOff % (ulong)pageSize;
+
+ if (currentMod != requiredMod)
+ {
+ long pad = (requiredMod >= currentMod)
+ ? (long)(requiredMod - currentMod)
+ : (long)((ulong)pageSize - currentMod + requiredMod);
+ for (long p = 0; p < pad; p++) ms.WriteByte(0);
+ newOff = ms.Position;
+ }
+
+ deltas.Add(System.Tuple.Create((ulong)oldOff, newOff - oldOff));
+ ms.Write(data, oldOff, filesz);
+ currentOld = oldOff + filesz;
+}
+
+if (currentOld < data.Length)
+ ms.Write(data, currentOld, data.Length - currentOld);
+
+byte[] newData = ms.ToArray();
+
+// ── Offset translation helper ───────────────────────────────────────
+System.Func translate = (ulong old) =>
+{
+ long d = 0;
+ foreach (var t in deltas)
+ {
+ if (old >= t.Item1) d = t.Item2;
+ else break;
+ }
+ return (ulong)((long)old + d);
+};
+
+// ── Patch ELF header: e_shoff ───────────────────────────────────────
+ulong newShoff = translate(e_shoff);
+WU64(newData, 40, newShoff);
+
+// ── Patch program headers ───────────────────────────────────────────
+for (int i = 0; i < e_phnum; i++)
+{
+ int oldHdr = (int)e_phoff + i * e_phentsize;
+ int newHdr = (int)translate((ulong)oldHdr);
+
+ WU64(newData, newHdr + 8, translate(RU64(data, oldHdr + 8))); // p_offset
+
+ if (RU32(data, oldHdr) == PT_LOAD)
+ WU64(newData, newHdr + 48, (ulong)pageSize); // p_align
+}
+
+// ── Patch section headers ───────────────────────────────────────────
+for (int i = 0; i < e_shnum; i++)
+{
+ int oldSh = (int)e_shoff + i * e_shentsize;
+ int newSh = (int)newShoff + i * e_shentsize;
+ WU64(newData, newSh + 24, translate(RU64(data, oldSh + 24))); // sh_offset
+}
+
+// ── Write patched file (with lock to handle parallel builds) ────────
+string lockFile = FilePath + ".patch-lock";
+System.IO.FileStream lockStream = null;
+try
+{
+ // Acquire an exclusive lock file to prevent concurrent writes.
+ // Retry up to 30 times with 1-second delays (handles parallel MSBuild nodes).
+ for (int attempt = 0; attempt < 30; attempt++)
+ {
+ try
+ {
+ lockStream = new System.IO.FileStream(lockFile,
+ System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite,
+ System.IO.FileShare.None);
+ break;
+ }
+ catch (System.IO.IOException)
+ {
+ System.Threading.Thread.Sleep(1000);
+ }
+ }
+
+ if (lockStream == null)
+ {
+ Log.LogMessage(MessageImportance.High,
+ "PatchElfPageSize: could not acquire lock for {0}, skipping (another build node may be patching it)",
+ System.IO.Path.GetFileName(FilePath));
+ return true;
+ }
+
+ // Re-read and re-check: another node may have already patched while we waited.
+ byte[] freshData = System.IO.File.ReadAllBytes(FilePath);
+ bool stillNeeds = false;
+ if (freshData.Length >= 64 && freshData[0] == 0x7F && freshData[4] == 2 && freshData[5] == 1)
+ {
+ ulong freshPhoff = RU64(freshData, 32);
+ int freshPhentsz = (int)(freshData[54] | (freshData[55] << 8));
+ int freshPhnum = (int)(freshData[56] | (freshData[57] << 8));
+ for (int i = 0; i < freshPhnum; i++)
+ {
+ int h = (int)freshPhoff + i * freshPhentsz;
+ if (RU32(freshData, h) == PT_LOAD && RU64(freshData, h + 48) < (ulong)pageSize)
+ {
+ stillNeeds = true;
+ break;
+ }
+ }
+ }
+
+ if (!stillNeeds)
+ {
+ Log.LogMessage(MessageImportance.Low,
+ "PatchElfPageSize: {0} was already patched by another build node",
+ System.IO.Path.GetFileName(FilePath));
+ return true;
+ }
+
+ System.IO.File.WriteAllBytes(FilePath, newData);
+ WasPatched = true;
+ Log.LogMessage(MessageImportance.High,
+ "PatchElfPageSize: patched {0} (align 0x1000 -> 0x{1:X}, +{2} bytes)",
+ System.IO.Path.GetFileName(FilePath), pageSize, newData.Length - data.Length);
+}
+finally
+{
+ if (lockStream != null)
+ {
+ lockStream.Dispose();
+ try { System.IO.File.Delete(lockFile); } catch { }
+ }
+}
+]]>
+
+
+
+
+
+
+ <_NuGetNativeLibs Include="$(NuGetPackageRoot)/**/runtimes/android-*/native/*.so" />
+
+
+
+
diff --git a/global.json b/global.json
index 789bff3bd0c2..fe7e453b1cd8 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "8.0.100",
+ "version": "10.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
diff --git a/osu.Android.props b/osu.Android.props
index 480469ff1738..c403e58001f2 100644
--- a/osu.Android.props
+++ b/osu.Android.props
@@ -4,10 +4,26 @@
android-x86;android-arm;android-arm64
apk
CJK;Mideast;Rare;West;Other;
- Xamarin.Android.Net.AndroidMessageHandler
+ Xamarin.Android.Net.AndroidMessageHandler, Mono.Android
true
true
+
+ false
+
+
+
+
+
+ true
+ true
+ true
diff --git a/osu.Android/AndroidManifest.xml b/osu.Android/AndroidManifest.xml
index c4d3442e4d39..fa98585b4342 100644
--- a/osu.Android/AndroidManifest.xml
+++ b/osu.Android/AndroidManifest.xml
@@ -1,6 +1,6 @@
-
+
- net8.0-android
+ net10.0-android
Exe
osu.Android
osu.Android
@@ -17,7 +17,7 @@
-
+
diff --git a/osu.Desktop/LegacyIpc/LegacyIpcMessage.cs b/osu.Desktop/LegacyIpc/LegacyIpcMessage.cs
index 8d0add32d1f6..02407da7874c 100644
--- a/osu.Desktop/LegacyIpc/LegacyIpcMessage.cs
+++ b/osu.Desktop/LegacyIpc/LegacyIpcMessage.cs
@@ -1,8 +1,8 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Framework.Platform;
using Newtonsoft.Json.Linq;
+using osu.Framework.Platform;
namespace osu.Desktop.LegacyIpc
{
diff --git a/osu.Desktop/NVAPI.cs b/osu.Desktop/NVAPI.cs
index fd372cddc582..72eab6d450b2 100644
--- a/osu.Desktop/NVAPI.cs
+++ b/osu.Desktop/NVAPI.cs
@@ -119,13 +119,11 @@ public static bool IsUsingOptimusDedicatedGpu
if (!IsLaptop)
return false;
- IntPtr profileHandle;
- if (!getProfile(out profileHandle, out _, out bool _))
+ if (!getProfile(out nint profileHandle, out _, out bool _))
return false;
// Get the optimus setting
- NvSetting setting;
- if (!getSetting(NvSettingID.SHIM_RENDERING_MODE_ID, profileHandle, out setting))
+ if (!getSetting(NvSettingID.SHIM_RENDERING_MODE_ID, profileHandle, out var setting))
return false;
return (setting.U32CurrentValue & (uint)NvShimSetting.SHIM_RENDERING_MODE_ENABLE) > 0;
@@ -164,13 +162,11 @@ public static NvThreadControlSetting ThreadedOptimisations
if (!Available)
return NvThreadControlSetting.OGL_THREAD_CONTROL_DEFAULT;
- IntPtr profileHandle;
- if (!getProfile(out profileHandle, out _, out bool _))
+ if (!getProfile(out nint profileHandle, out _, out bool _))
return NvThreadControlSetting.OGL_THREAD_CONTROL_DEFAULT;
// Get the threaded optimisations setting
- NvSetting setting;
- if (!getSetting(NvSettingID.OGL_THREAD_CONTROL_ID, profileHandle, out setting))
+ if (!getSetting(NvSettingID.OGL_THREAD_CONTROL_ID, profileHandle, out var setting))
return NvThreadControlSetting.OGL_THREAD_CONTROL_DEFAULT;
return (NvThreadControlSetting)setting.U32CurrentValue;
@@ -290,10 +286,7 @@ private static bool getSetting(NvSettingID settingId, IntPtr profileHandle, out
private static bool setSetting(NvSettingID settingId, uint settingValue)
{
- NvApplication application;
- IntPtr profileHandle;
- bool isApplicationSpecific;
- if (!getProfile(out profileHandle, out application, out isApplicationSpecific))
+ if (!getProfile(out nint profileHandle, out var application, out bool isApplicationSpecific))
return false;
if (!isApplicationSpecific)
@@ -378,8 +371,8 @@ static NVAPI()
return;
}
- InitializeDelegate initialize;
- getDelegate(0x0150E828, out initialize);
+ getDelegate(0x0150E828, out
+ InitializeDelegate initialize);
if (initialize?.Invoke() == NvStatus.OK)
{
diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs
index 054e27d396d3..a3ee9d67f873 100644
--- a/osu.Desktop/OsuGameDesktop.cs
+++ b/osu.Desktop/OsuGameDesktop.cs
@@ -6,21 +6,21 @@
using System.Reflection;
using System.Runtime.Versioning;
using Microsoft.Win32;
+using osu.Desktop.MacOS;
using osu.Desktop.Performance;
using osu.Desktop.Security;
-using osu.Framework.Platform;
-using osu.Game;
using osu.Desktop.Updater;
-using osu.Framework;
-using osu.Framework.Logging;
-using osu.Game.Updater;
-using osu.Desktop.MacOS;
using osu.Desktop.Windows;
+using osu.Framework;
using osu.Framework.Allocation;
+using osu.Framework.Logging;
+using osu.Framework.Platform;
+using osu.Game;
using osu.Game.Configuration;
using osu.Game.IO;
using osu.Game.IPC;
using osu.Game.Performance;
+using osu.Game.Updater;
using osu.Game.Utils;
namespace osu.Desktop
diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj
index bd0f4448fc8e..2bdba09e0675 100644
--- a/osu.Desktop/osu.Desktop.csproj
+++ b/osu.Desktop/osu.Desktop.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
WinExe
true
A free-to-win rhythm game. Rhythm is just a *click* away!
diff --git a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
index 104ee50fe105..b2170ee51027 100644
--- a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
+++ b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
Exe
false
@@ -9,7 +9,7 @@
-
+
diff --git a/osu.Game.Rulesets.Catch.Tests.Android/AndroidManifest.xml b/osu.Game.Rulesets.Catch.Tests.Android/AndroidManifest.xml
index f652190ffc59..f3e8aefe0fea 100644
--- a/osu.Game.Rulesets.Catch.Tests.Android/AndroidManifest.xml
+++ b/osu.Game.Rulesets.Catch.Tests.Android/AndroidManifest.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj b/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj
index 4b2e54be6736..800f28e67b81 100644
--- a/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj
+++ b/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Rulesets.Catch.Tests
osu.Game.Rulesets.Catch.Tests.Android
@@ -21,4 +21,13 @@
+
+
+
+
+ XamarinJetbrainsAnnotations
+
+
+
diff --git a/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj b/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj
index 9c262a752a98..eda288b1d90c 100644
--- a/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj
+++ b/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj
@@ -1,7 +1,7 @@
Exe
- net8.0-ios
+ net10.0-ios
13.4
osu.Game.Rulesets.Catch.Tests
osu.Game.Rulesets.Catch.Tests.iOS
diff --git a/osu.Game.Rulesets.Catch.Tests/CatchBeatmapConversionTest.cs b/osu.Game.Rulesets.Catch.Tests/CatchBeatmapConversionTest.cs
index f4c36d518800..83257fe536ee 100644
--- a/osu.Game.Rulesets.Catch.Tests/CatchBeatmapConversionTest.cs
+++ b/osu.Game.Rulesets.Catch.Tests/CatchBeatmapConversionTest.cs
@@ -96,33 +96,27 @@ public struct ConvertValue : IEquatable
public ConvertValue(CatchHitObject hitObject)
{
HitObject = hitObject;
- startTime = 0;
- position = 0;
- hyperDash = false;
+ StartTime = 0;
+ Position = 0;
+ HyperDash = false;
}
- private double startTime;
-
public double StartTime
{
- get => HitObject?.StartTime ?? startTime;
- set => startTime = value;
+ get => HitObject?.StartTime ?? field;
+ set;
}
- private float position;
-
public float Position
{
- get => HitObject?.EffectiveX ?? position;
- set => position = value;
+ get => HitObject?.EffectiveX ?? field;
+ set;
}
- private bool hyperDash;
-
public bool HyperDash
{
- get => (HitObject as PalpableCatchHitObject)?.HyperDash ?? hyperDash;
- set => hyperDash = value;
+ get => (HitObject as PalpableCatchHitObject)?.HyperDash ?? field;
+ set;
}
public bool Equals(ConvertValue other)
diff --git a/osu.Game.Rulesets.Catch.Tests/JuiceStreamPathTest.cs b/osu.Game.Rulesets.Catch.Tests/JuiceStreamPathTest.cs
index 9fb55fc05731..c23a4a607ea1 100644
--- a/osu.Game.Rulesets.Catch.Tests/JuiceStreamPathTest.cs
+++ b/osu.Game.Rulesets.Catch.Tests/JuiceStreamPathTest.cs
@@ -123,7 +123,7 @@ public void TestResampleVertices()
path.Clear();
path.SetVertexPosition(0, 10);
- path.ResampleVertices(Array.Empty());
+ path.ResampleVertices([]);
Assert.That(path.Vertices, Is.EqualTo(new[]
{
new JuiceStreamPathVertex(0, 10)
diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
index 51df1f5f013b..f381c12abf30 100644
--- a/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
+++ b/osu.Game.Rulesets.Catch.Tests/TestSceneCatcher.cs
@@ -9,7 +9,6 @@
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
-using osu.Game.Rulesets.Catch.UI;
using osu.Framework.Graphics.Containers;
using osu.Framework.Testing;
using osu.Framework.Utils;
@@ -19,6 +18,7 @@
using osu.Game.Rulesets.Catch.Judgements;
using osu.Game.Rulesets.Catch.Objects;
using osu.Game.Rulesets.Catch.Objects.Drawables;
+using osu.Game.Rulesets.Catch.UI;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Scoring;
using osu.Game.Tests.Visual;
diff --git a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
index 132bc4bed1f3..388802aaaa22 100644
--- a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
+++ b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
@@ -3,11 +3,11 @@
-
+
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs
index 1ff5083aaffd..d7906d20d924 100644
--- a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs
+++ b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmap.cs
@@ -56,7 +56,7 @@ public static IEnumerable GetPalpableObjects(IEnumerable
{
return hitObjects.SelectMany(selectPalpableObjects).OrderBy(h => h.StartTime);
- IEnumerable selectPalpableObjects(HitObject h)
+ static IEnumerable selectPalpableObjects(HitObject h)
{
if (h is PalpableCatchHitObject palpable)
yield return palpable;
diff --git a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
index 756376edf848..92555ffab121 100644
--- a/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
+++ b/osu.Game.Rulesets.Catch/Beatmaps/CatchBeatmapConverter.cs
@@ -1,15 +1,15 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Catch.Objects;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
-using osu.Game.Rulesets.Objects.Types;
-using osu.Game.Rulesets.Objects;
using osu.Framework.Extensions.IEnumerableExtensions;
+using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Legacy;
+using osu.Game.Rulesets.Catch.Objects;
+using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Objects.Types;
namespace osu.Game.Rulesets.Catch.Beatmaps
{
diff --git a/osu.Game.Rulesets.Catch/CatchRuleset.cs b/osu.Game.Rulesets.Catch/CatchRuleset.cs
index eb8cf137faf7..f74ec591077a 100644
--- a/osu.Game.Rulesets.Catch/CatchRuleset.cs
+++ b/osu.Game.Rulesets.Catch/CatchRuleset.cs
@@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using System;
using System.Collections.Generic;
using osu.Framework.Extensions.LocalisationExtensions;
using osu.Framework.Graphics;
@@ -164,7 +163,7 @@ public override IEnumerable GetModsFor(ModType type)
};
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/osu.Game.Rulesets.Catch/Edit/Checks/CheckCatchAbnormalDifficultySettings.cs b/osu.Game.Rulesets.Catch/Edit/Checks/CheckCatchAbnormalDifficultySettings.cs
index cb1d5fd9cbb4..d028aaf6ff0c 100644
--- a/osu.Game.Rulesets.Catch/Edit/Checks/CheckCatchAbnormalDifficultySettings.cs
+++ b/osu.Game.Rulesets.Catch/Edit/Checks/CheckCatchAbnormalDifficultySettings.cs
@@ -15,9 +15,8 @@ public class CheckCatchAbnormalDifficultySettings : CheckAbnormalDifficultySetti
public override IEnumerable Run(BeatmapVerifierContext context)
{
var diff = context.CurrentDifficulty.Playable.Difficulty;
- Issue? issue;
- if (HasMoreThanOneDecimalPlace("Approach rate", diff.ApproachRate, out issue))
+ if (HasMoreThanOneDecimalPlace("Approach rate", diff.ApproachRate, out var issue))
yield return issue;
if (OutOfRange("Approach rate", diff.ApproachRate, out issue))
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs b/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
index e0705e4bbb74..a85ba149cb0e 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModDifficultyAdjust.cs
@@ -51,7 +51,7 @@ public override string ExtendedIconInformation
return string.Empty;
- string format(string acronym, DifficultyBindable bindable)
+ static string format(string acronym, DifficultyBindable bindable)
=> $"{acronym}{bindable.Value!.Value.ToStandardFormattedString(1)}";
}
}
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs b/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
index f7d64dc57bc9..5745a10a78de 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModHardRock.cs
@@ -2,9 +2,9 @@
// See the LICENCE file in the repository root for full licence text.
using System;
-using osu.Game.Rulesets.Mods;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Beatmaps;
+using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Catch.Mods
{
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModMirror.cs b/osu.Game.Rulesets.Catch/Mods/CatchModMirror.cs
index 4cd2efdc2f59..d3e6af54bf71 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModMirror.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModMirror.cs
@@ -6,8 +6,8 @@
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Catch.Beatmaps;
using osu.Game.Rulesets.Catch.Objects;
-using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Catch.UI;
+using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osuTK;
diff --git a/osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs b/osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs
index ddeea51ecbd9..a9e02006ffe9 100644
--- a/osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs
+++ b/osu.Game.Rulesets.Catch/Mods/CatchModNoScope.cs
@@ -4,9 +4,9 @@
using System;
using osu.Framework.Bindables;
using osu.Framework.Localisation;
-using osu.Game.Rulesets.Mods;
using osu.Framework.Utils;
using osu.Game.Rulesets.Catch.UI;
+using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Catch.Mods
diff --git a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs
index 2f186f5ab4ce..1d9868ee39b8 100644
--- a/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs
+++ b/osu.Game.Rulesets.Catch/Objects/CatchHitObject.cs
@@ -172,8 +172,7 @@ public void UpdateComboInformation(IHasComboInformation? lastObj)
index++;
indexWithOffsets += ComboOffset + 1;
- if (lastObj != null)
- lastObj.LastInCombo = true;
+ lastObj?.LastInCombo = true;
}
ComboIndex = index;
diff --git a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBanana.cs b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBanana.cs
index 10e483b57749..157fda8f49af 100644
--- a/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBanana.cs
+++ b/osu.Game.Rulesets.Catch/Objects/Drawables/DrawableBanana.cs
@@ -78,8 +78,7 @@ protected override void Update()
public override void PlaySamples()
{
base.PlaySamples();
- if (Samples != null)
- Samples.Frequency.Value = 0.77f + ((Banana)HitObject).BananaIndex * 0.006f;
+ Samples?.Frequency.Value = 0.77f + ((Banana)HitObject).BananaIndex * 0.006f;
}
}
}
diff --git a/osu.Game.Rulesets.Catch/Objects/JuiceStream.cs b/osu.Game.Rulesets.Catch/Objects/JuiceStream.cs
index 9e7e0b604237..318207d029dd 100644
--- a/osu.Game.Rulesets.Catch/Objects/JuiceStream.cs
+++ b/osu.Game.Rulesets.Catch/Objects/JuiceStream.cs
@@ -149,18 +149,16 @@ public double Duration
public double EndTime => StartTime + Duration;
- private readonly SliderPath path = new SliderPath();
-
public SliderPath Path
{
- get => path;
+ get;
set
{
- path.ControlPoints.Clear();
- path.ControlPoints.AddRange(value.ControlPoints.Select(c => new PathControlPoint(c.Position, c.Type)));
- path.ExpectedDistance.Value = value.ExpectedDistance.Value;
+ field.ControlPoints.Clear();
+ field.ControlPoints.AddRange(value.ControlPoints.Select(c => new PathControlPoint(c.Position, c.Type)));
+ field.ExpectedDistance.Value = value.ExpectedDistance.Value;
}
- }
+ } = new SliderPath();
public double Distance => Path.Distance;
diff --git a/osu.Game.Rulesets.Catch/Objects/PalpableCatchHitObject.cs b/osu.Game.Rulesets.Catch/Objects/PalpableCatchHitObject.cs
index 197029aeebd9..59c000a27d6e 100644
--- a/osu.Game.Rulesets.Catch/Objects/PalpableCatchHitObject.cs
+++ b/osu.Game.Rulesets.Catch/Objects/PalpableCatchHitObject.cs
@@ -32,18 +32,16 @@ public abstract class PalpableCatchHitObject : CatchHitObject, IHasComboInformat
///
public bool HyperDash => hyperDash.Value;
- private CatchHitObject? hyperDashTarget;
-
///
/// The target fruit if we are to initiate a hyperdash.
///
[JsonIgnore]
public CatchHitObject? HyperDashTarget
{
- get => hyperDashTarget;
+ get;
set
{
- hyperDashTarget = value;
+ field = value;
HyperDashBindable.Value = value != null;
}
}
diff --git a/osu.Game.Rulesets.Catch/Scoring/CatchHealthProcessor.cs b/osu.Game.Rulesets.Catch/Scoring/CatchHealthProcessor.cs
index b2509091fe2e..e37bd13df0da 100644
--- a/osu.Game.Rulesets.Catch/Scoring/CatchHealthProcessor.cs
+++ b/osu.Game.Rulesets.Catch/Scoring/CatchHealthProcessor.cs
@@ -20,7 +20,7 @@ public CatchHealthProcessor(double drainStartTime)
protected override IEnumerable EnumerateTopLevelHitObjects() => EnumerateHitObjects(Beatmap).Where(h => h is Fruit || h is Droplet || h is Banana);
- protected override IEnumerable EnumerateNestedHitObjects(HitObject hitObject) => Enumerable.Empty();
+ protected override IEnumerable EnumerateNestedHitObjects(HitObject hitObject) => [];
protected override bool CheckDefaultFailCondition(JudgementResult result)
{
diff --git a/osu.Game.Rulesets.Catch/Skinning/Default/CatchHitObjectPiece.cs b/osu.Game.Rulesets.Catch/Skinning/Default/CatchHitObjectPiece.cs
index 7cc425966d04..1cc1875b0616 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Default/CatchHitObjectPiece.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Default/CatchHitObjectPiece.cs
@@ -40,15 +40,13 @@ protected override void LoadComplete()
HyperDash.BindValueChanged(hyper =>
{
- if (HyperBorderPiece != null)
- HyperBorderPiece.Alpha = hyper.NewValue ? 1 : 0;
+ HyperBorderPiece?.Alpha = hyper.NewValue ? 1 : 0;
}, true);
}
protected override void Update()
{
- if (BorderPiece != null)
- BorderPiece.Alpha = (float)Math.Clamp((ObjectState.HitObject.StartTime - Time.Current) / 500, 0, 1);
+ BorderPiece?.Alpha = (float)Math.Clamp((ObjectState.HitObject.StartTime - Time.Current) / 500, 0, 1);
}
}
}
diff --git a/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchComboCounter.cs b/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchComboCounter.cs
index f38b9b430ef7..3248ccba7263 100644
--- a/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchComboCounter.cs
+++ b/osu.Game.Rulesets.Catch/Skinning/Legacy/LegacyCatchComboCounter.cs
@@ -60,7 +60,7 @@ public void UpdateCombo(int combo, Color4? hitObjectColour = null)
lastDisplayedCombo = combo;
- if ((Clock as IGameplayClock)?.IsRewinding == true)
+ if (Clock is IGameplayClock { IsRewinding: true })
{
// needs more work to make rewind somehow look good.
// basically we want the previous increment to play... or turning off RemoveCompletedTransforms (not feasible from a performance angle).
diff --git a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs
index 7f0a79ef4933..1cb806da6a7d 100644
--- a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs
+++ b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs
@@ -24,9 +24,9 @@ public partial class CatcherArea : Container, IKeyBindingHandler
{
public Catcher Catcher
{
- get => catcher;
- set => catcherContainer.Child = catcher = value;
- }
+ get;
+ set => catcherContainer.Child = field = value;
+ } = null!;
private readonly Container catcherContainer;
@@ -34,8 +34,6 @@ public Catcher Catcher
public readonly CatcherTrailDisplay CatcherTrails;
- private Catcher catcher = null!;
-
///
/// -1 when only left button is pressed.
/// 1 when only right button is pressed.
@@ -97,7 +95,7 @@ protected override void UpdateAfterChildren()
comboDisplay.X = Catcher.X;
- if ((Clock as IGameplayClock)?.IsRewinding == true)
+ if (Clock is IGameplayClock { IsRewinding: true })
{
// This is probably a wrong value, but currently the true value is not recorded.
// Setting `true` will prevent generation of false-positive after-images (with more false-negatives).
diff --git a/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj b/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj
index a5138ffb3903..fbd7369412bf 100644
--- a/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj
+++ b/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
catch the fruit. to the beat.
diff --git a/osu.Game.Rulesets.Mania.Tests.Android/AndroidManifest.xml b/osu.Game.Rulesets.Mania.Tests.Android/AndroidManifest.xml
index 0f28bd8394aa..79d1b1b99df1 100644
--- a/osu.Game.Rulesets.Mania.Tests.Android/AndroidManifest.xml
+++ b/osu.Game.Rulesets.Mania.Tests.Android/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/osu.Game.Rulesets.Mania.Tests.Android/osu.Game.Rulesets.Mania.Tests.Android.csproj b/osu.Game.Rulesets.Mania.Tests.Android/osu.Game.Rulesets.Mania.Tests.Android.csproj
index 2866508a0227..d149d78d411b 100644
--- a/osu.Game.Rulesets.Mania.Tests.Android/osu.Game.Rulesets.Mania.Tests.Android.csproj
+++ b/osu.Game.Rulesets.Mania.Tests.Android/osu.Game.Rulesets.Mania.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Rulesets.Mania.Tests
osu.Game.Rulesets.Mania.Tests.Android
@@ -21,4 +21,13 @@
+
+
+
+
+ XamarinJetbrainsAnnotations
+
+
+
diff --git a/osu.Game.Rulesets.Mania.Tests.iOS/osu.Game.Rulesets.Mania.Tests.iOS.csproj b/osu.Game.Rulesets.Mania.Tests.iOS/osu.Game.Rulesets.Mania.Tests.iOS.csproj
index d51e541e95bb..29c7c9ff55e8 100644
--- a/osu.Game.Rulesets.Mania.Tests.iOS/osu.Game.Rulesets.Mania.Tests.iOS.csproj
+++ b/osu.Game.Rulesets.Mania.Tests.iOS/osu.Game.Rulesets.Mania.Tests.iOS.csproj
@@ -1,7 +1,7 @@
Exe
- net8.0-ios
+ net10.0-ios
13.4
osu.Game.Rulesets.Mania.Tests
osu.Game.Rulesets.Mania.Tests.iOS
diff --git a/osu.Game.Rulesets.Mania.Tests/Editor/Checks/CheckKeyCountTest.cs b/osu.Game.Rulesets.Mania.Tests/Editor/Checks/CheckKeyCountTest.cs
index b40a62176c1d..61e5e7692a0a 100644
--- a/osu.Game.Rulesets.Mania.Tests/Editor/Checks/CheckKeyCountTest.cs
+++ b/osu.Game.Rulesets.Mania.Tests/Editor/Checks/CheckKeyCountTest.cs
@@ -1,13 +1,13 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
+using System.Linq;
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Edit;
+using osu.Game.Rulesets.Mania.Edit.Checks;
using osu.Game.Rulesets.Objects;
using osu.Game.Tests.Beatmaps;
-using osu.Game.Rulesets.Mania.Edit.Checks;
-using System.Linq;
namespace osu.Game.Rulesets.Mania.Tests.Editor.Checks
{
diff --git a/osu.Game.Rulesets.Mania.Tests/Editor/Checks/CheckManiaAbnormalDifficultySettingsTest.cs b/osu.Game.Rulesets.Mania.Tests/Editor/Checks/CheckManiaAbnormalDifficultySettingsTest.cs
index da5ab037e5b6..3b2794e73b7f 100644
--- a/osu.Game.Rulesets.Mania.Tests/Editor/Checks/CheckManiaAbnormalDifficultySettingsTest.cs
+++ b/osu.Game.Rulesets.Mania.Tests/Editor/Checks/CheckManiaAbnormalDifficultySettingsTest.cs
@@ -4,9 +4,9 @@
using System.Linq;
using NUnit.Framework;
using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Mania.Edit.Checks;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Edit.Checks;
+using osu.Game.Rulesets.Mania.Edit.Checks;
using osu.Game.Rulesets.Objects;
using osu.Game.Tests.Beatmaps;
diff --git a/osu.Game.Rulesets.Mania.Tests/Editor/ManiaPlacementBlueprintTestScene.cs b/osu.Game.Rulesets.Mania.Tests/Editor/ManiaPlacementBlueprintTestScene.cs
index 83070c3e2913..a203a664cb64 100644
--- a/osu.Game.Rulesets.Mania.Tests/Editor/ManiaPlacementBlueprintTestScene.cs
+++ b/osu.Game.Rulesets.Mania.Tests/Editor/ManiaPlacementBlueprintTestScene.cs
@@ -3,7 +3,6 @@
#nullable disable
-using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
@@ -27,7 +26,7 @@ public abstract partial class ManiaPlacementBlueprintTestScene : PlacementBluepr
private readonly Column column;
[Cached(typeof(IReadOnlyList))]
- private IReadOnlyList mods { get; set; } = Array.Empty();
+ private IReadOnlyList mods { get; set; } = [];
[Cached(typeof(IScrollingInfo))]
private IScrollingInfo scrollingInfo;
diff --git a/osu.Game.Rulesets.Mania.Tests/Editor/TestSceneManiaBeatSnapGrid.cs b/osu.Game.Rulesets.Mania.Tests/Editor/TestSceneManiaBeatSnapGrid.cs
index 19ff13e216de..a476aabf94b5 100644
--- a/osu.Game.Rulesets.Mania.Tests/Editor/TestSceneManiaBeatSnapGrid.cs
+++ b/osu.Game.Rulesets.Mania.Tests/Editor/TestSceneManiaBeatSnapGrid.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
@@ -86,7 +85,7 @@ public partial class TestHitObjectComposer : HitObjectComposer
{
public override Playfield Playfield { get; }
public override ComposeBlueprintContainer BlueprintContainer => throw new NotImplementedException();
- public override IEnumerable HitObjects => Enumerable.Empty();
+ public override IEnumerable HitObjects => [];
public override bool CursorInPlacementArea => false;
public TestHitObjectComposer(Playfield playfield)
diff --git a/osu.Game.Rulesets.Mania.Tests/ManiaSpecialColumnTest.cs b/osu.Game.Rulesets.Mania.Tests/ManiaSpecialColumnTest.cs
index 726d0af945a0..a619d0ae935b 100644
--- a/osu.Game.Rulesets.Mania.Tests/ManiaSpecialColumnTest.cs
+++ b/osu.Game.Rulesets.Mania.Tests/ManiaSpecialColumnTest.cs
@@ -2,9 +2,9 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
-using osu.Game.Rulesets.Mania.Beatmaps;
using NUnit.Framework;
using NUnit.Framework.Legacy;
+using osu.Game.Rulesets.Mania.Beatmaps;
namespace osu.Game.Rulesets.Mania.Tests
{
diff --git a/osu.Game.Rulesets.Mania.Tests/Mods/TestSceneManiaModHoldOff.cs b/osu.Game.Rulesets.Mania.Tests/Mods/TestSceneManiaModHoldOff.cs
index a06d389f957b..747234213318 100644
--- a/osu.Game.Rulesets.Mania.Tests/Mods/TestSceneManiaModHoldOff.cs
+++ b/osu.Game.Rulesets.Mania.Tests/Mods/TestSceneManiaModHoldOff.cs
@@ -5,11 +5,11 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Mania.Mods;
-using osu.Game.Tests.Visual;
-using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Mania.Beatmaps;
+using osu.Game.Rulesets.Mania.Mods;
+using osu.Game.Rulesets.Mania.Objects;
+using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Mania.Tests.Mods
{
diff --git a/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs
index cb9fcca5b026..ef1790917fbe 100644
--- a/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs
+++ b/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs
@@ -1,11 +1,10 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using System;
using System.Collections.Generic;
using NUnit.Framework;
-using osu.Framework.Graphics;
using osu.Framework.Allocation;
+using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
@@ -25,7 +24,7 @@ namespace osu.Game.Rulesets.Mania.Tests
public partial class TestSceneColumn : ManiaInputTestScene
{
[Cached(typeof(IReadOnlyList))]
- private IReadOnlyList mods { get; set; } = Array.Empty();
+ private IReadOnlyList mods { get; set; } = [];
[Cached]
private readonly StageDefinition stage = new StageDefinition(1);
diff --git a/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs
index 195365fb18d9..ce1a2dcfa46a 100644
--- a/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs
+++ b/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs
@@ -3,7 +3,6 @@
#nullable disable
-using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
@@ -29,7 +28,7 @@ public partial class TestSceneStage : ManiaInputTestScene
private const int columns = 4;
[Cached(typeof(IReadOnlyList))]
- private IReadOnlyList mods { get; set; } = Array.Empty();
+ private IReadOnlyList mods { get; set; } = [];
private readonly List stages = new List();
diff --git a/osu.Game.Rulesets.Mania.Tests/TestSceneTimingBasedNoteColouring.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneTimingBasedNoteColouring.cs
index eb47e9667067..88dd3f56f585 100644
--- a/osu.Game.Rulesets.Mania.Tests/TestSceneTimingBasedNoteColouring.cs
+++ b/osu.Game.Rulesets.Mania.Tests/TestSceneTimingBasedNoteColouring.cs
@@ -5,21 +5,21 @@
using System.Linq;
using NUnit.Framework;
+using osu.Framework.Bindables;
+using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
+using osu.Framework.Testing;
+using osu.Framework.Timing;
+using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
-using osu.Game.Tests.Visual;
-using osu.Framework.Timing;
-using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.Configuration;
-using osu.Framework.Bindables;
-using osu.Framework.Extensions.ObjectExtensions;
-using osu.Framework.Testing;
-using osu.Framework.Utils;
+using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mania.Objects.Drawables;
using osu.Game.Rulesets.Mania.UI;
+using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Mania.Tests
{
diff --git a/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj b/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
index 8d5c4d9da61b..823fe8dff10c 100644
--- a/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
+++ b/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
@@ -3,11 +3,11 @@
-
+
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs
index c55465762b67..87b9d190d9f7 100644
--- a/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs
+++ b/osu.Game.Rulesets.Mania/Beatmaps/ManiaBeatmapConverter.cs
@@ -1,19 +1,19 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Game.Rulesets.Mania.Objects;
using System;
-using System.Linq;
using System.Collections.Generic;
+using System.Linq;
using System.Threading;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Legacy;
-using osu.Game.Rulesets.Objects;
-using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Mania.Beatmaps.Patterns;
using osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy;
+using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Mods;
+using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Legacy;
+using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Scoring.Legacy;
using osu.Game.Utils;
using osuTK;
diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitCirclePatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitCirclePatternGenerator.cs
index 28499f3edcd2..11664af76242 100644
--- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitCirclePatternGenerator.cs
+++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/HitCirclePatternGenerator.cs
@@ -4,15 +4,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using osuTK;
+using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
-using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Utils;
+using osuTK;
namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
{
diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/SpinnerPatternGenerator.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/SpinnerPatternGenerator.cs
index f2ca2888c7fb..92b77293821b 100644
--- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/SpinnerPatternGenerator.cs
+++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Legacy/SpinnerPatternGenerator.cs
@@ -2,12 +2,12 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
-using osu.Game.Rulesets.Objects;
-using osu.Game.Rulesets.Objects.Types;
using System.Linq;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mania.Objects;
+using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Objects.Types;
using osu.Game.Utils;
namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
diff --git a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Pattern.cs b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Pattern.cs
index 9e4d8b599ef2..f84b56baf10f 100644
--- a/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Pattern.cs
+++ b/osu.Game.Rulesets.Mania/Beatmaps/Patterns/Pattern.cs
@@ -3,7 +3,6 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
-using System.Linq;
using osu.Game.Rulesets.Mania.Objects;
namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns
@@ -19,7 +18,7 @@ internal class Pattern
///
/// All the hit objects contained in this pattern.
///
- public IEnumerable HitObjects => hitObjects ?? Enumerable.Empty();
+ public IEnumerable HitObjects => hitObjects ?? [];
///
/// Check whether a column of this patterns contains a hit object.
diff --git a/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaPlacementBlueprint.cs b/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaPlacementBlueprint.cs
index 423f14b092fb..d14709081476 100644
--- a/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaPlacementBlueprint.cs
+++ b/osu.Game.Rulesets.Mania/Edit/Blueprints/ManiaPlacementBlueprint.cs
@@ -23,20 +23,18 @@ public abstract partial class ManiaPlacementBlueprint : HitObjectPlacementBlu
[Resolved]
private ManiaHitObjectComposer? composer { get; set; }
- private Column? column;
-
public Column? Column
{
- get => column;
+ get;
set
{
ArgumentNullException.ThrowIfNull(value);
- if (value == column)
+ if (value == field)
return;
- column = value;
- HitObject.Column = column.Index;
+ field = value;
+ HitObject.Column = field.Index;
}
}
diff --git a/osu.Game.Rulesets.Mania/Edit/Checks/CheckManiaAbnormalDifficultySettings.cs b/osu.Game.Rulesets.Mania/Edit/Checks/CheckManiaAbnormalDifficultySettings.cs
index cdea7c88a77c..df0b3d556153 100644
--- a/osu.Game.Rulesets.Mania/Edit/Checks/CheckManiaAbnormalDifficultySettings.cs
+++ b/osu.Game.Rulesets.Mania/Edit/Checks/CheckManiaAbnormalDifficultySettings.cs
@@ -15,9 +15,8 @@ public class CheckManiaAbnormalDifficultySettings : CheckAbnormalDifficultySetti
public override IEnumerable Run(BeatmapVerifierContext context)
{
var diff = context.CurrentDifficulty.Playable.Difficulty;
- Issue? issue;
- if (HasMoreThanOneDecimalPlace("Overall difficulty", diff.OverallDifficulty, out issue))
+ if (HasMoreThanOneDecimalPlace("Overall difficulty", diff.OverallDifficulty, out var issue))
yield return issue;
if (OutOfRange("Overall difficulty", diff.OverallDifficulty, out issue))
diff --git a/osu.Game.Rulesets.Mania/Edit/ManiaEditorPlayfield.cs b/osu.Game.Rulesets.Mania/Edit/ManiaEditorPlayfield.cs
index 2dc2b8ae48bd..de7f96d15f52 100644
--- a/osu.Game.Rulesets.Mania/Edit/ManiaEditorPlayfield.cs
+++ b/osu.Game.Rulesets.Mania/Edit/ManiaEditorPlayfield.cs
@@ -1,9 +1,9 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
+using System.Collections.Generic;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.UI;
-using System.Collections.Generic;
namespace osu.Game.Rulesets.Mania.Edit
{
diff --git a/osu.Game.Rulesets.Mania/ManiaRuleset.cs b/osu.Game.Rulesets.Mania/ManiaRuleset.cs
index 3fad9d1047b6..46c7e9d5c01e 100644
--- a/osu.Game.Rulesets.Mania/ManiaRuleset.cs
+++ b/osu.Game.Rulesets.Mania/ManiaRuleset.cs
@@ -303,7 +303,7 @@ public override IEnumerable GetModsFor(ModType type)
};
default:
- return Array.Empty();
+ return [];
}
}
@@ -349,7 +349,7 @@ public override IEnumerable GetDefaultKeyBindings(int variant = 0)
return new DualStageVariantGenerator(getDualStageKeyCount(variant)).GenerateMappings();
}
- return Array.Empty();
+ return [];
}
public override LocalisableString GetVariantName(int variant)
diff --git a/osu.Game.Rulesets.Mania/MathUtils/LegacySortHelper.cs b/osu.Game.Rulesets.Mania/MathUtils/LegacySortHelper.cs
index 4d9382624097..428356928976 100644
--- a/osu.Game.Rulesets.Mania/MathUtils/LegacySortHelper.cs
+++ b/osu.Game.Rulesets.Mania/MathUtils/LegacySortHelper.cs
@@ -98,12 +98,12 @@ private static void heapsort(T[] keys, int lo, int hi, IComparer comparer)
int n = hi - lo + 1;
- for (int i = n / 2; i >= 1; i = i - 1)
+ for (int i = n / 2; i >= 1; i--)
{
downHeap(keys, i, n, lo, comparer);
}
- for (int i = n; i > 1; i = i - 1)
+ for (int i = n; i > 1; i--)
{
swap(keys, lo, lo + i - 1);
downHeap(keys, 1, i - 1, lo, comparer);
diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs
index 3365b206cf18..1b16f0c30f2f 100644
--- a/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs
+++ b/osu.Game.Rulesets.Mania/Mods/ManiaModHidden.cs
@@ -4,12 +4,12 @@
using System;
using System.Linq;
using osu.Framework.Allocation;
-using osu.Framework.Localisation;
-using osu.Game.Rulesets.Mania.UI;
using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
+using osu.Framework.Localisation;
using osu.Game.Rulesets.Mania.Skinning;
+using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModHoldOff.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModHoldOff.cs
index 6332e2a928cb..e21e3b252cd7 100644
--- a/osu.Game.Rulesets.Mania/Mods/ManiaModHoldOff.cs
+++ b/osu.Game.Rulesets.Mania/Mods/ManiaModHoldOff.cs
@@ -2,16 +2,16 @@
// See the LICENCE file in the repository root for full licence text.
using System;
+using System.Collections.Generic;
using System.Linq;
-using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Mania.Objects;
-using osu.Game.Rulesets.Mods;
using osu.Framework.Graphics.Sprites;
-using System.Collections.Generic;
using osu.Framework.Localisation;
using osu.Framework.Utils;
+using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Rulesets.Mania.Beatmaps;
+using osu.Game.Rulesets.Mania.Objects;
+using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Mania.Mods
{
diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaModMirror.cs b/osu.Game.Rulesets.Mania/Mods/ManiaModMirror.cs
index cc7e270dda83..88000b9532a4 100644
--- a/osu.Game.Rulesets.Mania/Mods/ManiaModMirror.cs
+++ b/osu.Game.Rulesets.Mania/Mods/ManiaModMirror.cs
@@ -1,13 +1,13 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Framework.Extensions.IEnumerableExtensions;
-using osu.Game.Rulesets.Mania.Objects;
-using osu.Game.Rulesets.Mods;
using System.Linq;
+using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Mania.Beatmaps;
+using osu.Game.Rulesets.Mania.Objects;
+using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Mania.Mods
{
diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs
index 7a9fb1377ee6..78f1bba8d0c0 100644
--- a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs
+++ b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableHoldNote.cs
@@ -310,7 +310,7 @@ public bool OnPressed(KeyBindingPressEvent e)
return false;
// do not run any of this logic when rewinding, as it inverts order of presses/releases.
- if ((Clock as IGameplayClock)?.IsRewinding == true)
+ if (Clock is IGameplayClock { IsRewinding: true })
return false;
if (CheckHittable?.Invoke(this, Time.Current) == false)
@@ -344,7 +344,7 @@ public void OnReleased(KeyBindingReleaseEvent e)
return;
// do not run any of this logic when rewinding, as it inverts order of presses/releases.
- if ((Clock as IGameplayClock)?.IsRewinding == true)
+ if (Clock is IGameplayClock { IsRewinding: true })
return;
// When our action is released and we are in the middle of a hold, there's a chance that
diff --git a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs
index e98622b8bf21..2f3569e62119 100644
--- a/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs
+++ b/osu.Game.Rulesets.Mania/Objects/Drawables/DrawableManiaHitObject.cs
@@ -8,9 +8,9 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
+using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.UI.Scrolling;
-using osu.Game.Rulesets.Mania.UI;
namespace osu.Game.Rulesets.Mania.Objects.Drawables
{
diff --git a/osu.Game.Rulesets.Mania/Objects/HoldNote.cs b/osu.Game.Rulesets.Mania/Objects/HoldNote.cs
index d0d0cadc00e9..12d884e29800 100644
--- a/osu.Game.Rulesets.Mania/Objects/HoldNote.cs
+++ b/osu.Game.Rulesets.Mania/Objects/HoldNote.cs
@@ -24,17 +24,14 @@ public double EndTime
set => Duration = value - StartTime;
}
- private double duration;
-
public double Duration
{
- get => duration;
+ get;
set
{
- duration = value;
+ field = value;
- if (Tail != null)
- Tail.StartTime = EndTime;
+ Tail?.StartTime = EndTime;
}
}
@@ -45,11 +42,9 @@ public override double StartTime
{
base.StartTime = value;
- if (Head != null)
- Head.StartTime = value;
+ Head?.StartTime = value;
- if (Tail != null)
- Tail.StartTime = EndTime;
+ Tail?.StartTime = EndTime;
}
}
@@ -60,11 +55,9 @@ public override int Column
{
base.Column = value;
- if (Head != null)
- Head.Column = value;
+ Head?.Column = value;
- if (Tail != null)
- Tail.Column = value;
+ Tail?.Column = value;
}
}
diff --git a/osu.Game.Rulesets.Mania/Scoring/ManiaHitWindows.cs b/osu.Game.Rulesets.Mania/Scoring/ManiaHitWindows.cs
index abff91926a1d..cdcbf6341b90 100644
--- a/osu.Game.Rulesets.Mania/Scoring/ManiaHitWindows.cs
+++ b/osu.Game.Rulesets.Mania/Scoring/ManiaHitWindows.cs
@@ -16,8 +16,6 @@ public class ManiaHitWindows : HitWindows
private static readonly DifficultyRange meh_window_range = new DifficultyRange(151, 136, 121);
private static readonly DifficultyRange miss_window_range = new DifficultyRange(188, 173, 158);
- private double speedMultiplier = 1;
-
///
/// Multiplier used to compensate for the playback speed of the track speeding up or slowing down.
/// The goal of this multiplier is to keep hit windows independent of track speed.
@@ -28,15 +26,13 @@ public class ManiaHitWindows : HitWindows
///
public double SpeedMultiplier
{
- get => speedMultiplier;
+ get;
set
{
- speedMultiplier = value;
+ field = value;
updateWindows();
}
- }
-
- private double difficultyMultiplier = 1;
+ } = 1;
///
/// Multiplier used to make the gameplay more or less difficult.
@@ -47,50 +43,44 @@ public double SpeedMultiplier
///
public double DifficultyMultiplier
{
- get => difficultyMultiplier;
+ get;
set
{
- difficultyMultiplier = value;
+ field = value;
updateWindows();
}
- }
+ } = 1;
- private double totalMultiplier => speedMultiplier / difficultyMultiplier;
+ private double totalMultiplier => SpeedMultiplier / DifficultyMultiplier;
private double overallDifficulty;
- private bool classicModActive;
-
public bool ClassicModActive
{
- get => classicModActive;
+ get;
set
{
- classicModActive = value;
+ field = value;
updateWindows();
}
}
- private bool scoreV2Active;
-
public bool ScoreV2Active
{
- get => scoreV2Active;
+ get;
set
{
- scoreV2Active = value;
+ field = value;
updateWindows();
}
}
- private bool isConvert;
-
public bool IsConvert
{
- get => isConvert;
+ get;
set
{
- isConvert = value;
+ field = value;
updateWindows();
}
}
diff --git a/osu.Game.Rulesets.Mania/Skinning/Argon/ArgonHoldNoteTailPiece.cs b/osu.Game.Rulesets.Mania/Skinning/Argon/ArgonHoldNoteTailPiece.cs
index 3c69a0500304..3ec8fbfdb6dd 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Argon/ArgonHoldNoteTailPiece.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Argon/ArgonHoldNoteTailPiece.cs
@@ -125,8 +125,7 @@ protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
- if (drawableObject != null)
- drawableObject.HitObjectApplied -= hitObjectApplied;
+ drawableObject?.HitObjectApplied -= hitObjectApplied;
}
}
}
diff --git a/osu.Game.Rulesets.Mania/Skinning/Argon/ManiaArgonSkinTransformer.cs b/osu.Game.Rulesets.Mania/Skinning/Argon/ManiaArgonSkinTransformer.cs
index 81cc52e9259b..e8e274af7b66 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Argon/ManiaArgonSkinTransformer.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Argon/ManiaArgonSkinTransformer.cs
@@ -44,8 +44,7 @@ public ManiaArgonSkinTransformer(ISkin skin, IBeatmap beatmap)
var combo = container.ChildrenOfType().FirstOrDefault();
var spectatorList = container.OfType().FirstOrDefault();
- if (leaderboard != null)
- leaderboard.Position = new Vector2(36, 115);
+ leaderboard?.Position = new Vector2(36, 115);
if (combo != null)
{
@@ -55,8 +54,7 @@ public ManiaArgonSkinTransformer(ISkin skin, IBeatmap beatmap)
combo.Y = 200;
}
- if (spectatorList != null)
- spectatorList.Position = new Vector2(36, -66);
+ spectatorList?.Position = new Vector2(36, -66);
foreach (var d in container.OfType())
d.UsesFixedAnchor = true;
diff --git a/osu.Game.Rulesets.Mania/Skinning/Legacy/LegacyBodyPiece.cs b/osu.Game.Rulesets.Mania/Skinning/Legacy/LegacyBodyPiece.cs
index de0baa7a5c20..7c8cf0d6a30a 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Legacy/LegacyBodyPiece.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Legacy/LegacyBodyPiece.cs
@@ -148,8 +148,7 @@ private void onDirectionChanged(ValueChangedEvent direction)
bodySprite.Anchor = Anchor.BottomCentre; // needs to be flipped due to scale flip in Update.
}
- if (light != null)
- light.Anchor = Anchor.TopCentre;
+ light?.Anchor = Anchor.TopCentre;
}
else
{
@@ -159,8 +158,7 @@ private void onDirectionChanged(ValueChangedEvent direction)
bodySprite.Anchor = Anchor.TopCentre;
}
- if (light != null)
- light.Anchor = Anchor.BottomCentre;
+ light?.Anchor = Anchor.BottomCentre;
}
}
@@ -193,8 +191,7 @@ protected override void Update()
{
case LegacyNoteBodyStyle.Stretch:
// this is how lazer works by default. nothing required.
- if (bodySprite != null)
- bodySprite.Scale = new Vector2(1, scaleDirection);
+ bodySprite?.Scale = new Vector2(1, scaleDirection);
break;
default:
diff --git a/osu.Game.Rulesets.Mania/Skinning/Legacy/LegacyHitExplosion.cs b/osu.Game.Rulesets.Mania/Skinning/Legacy/LegacyHitExplosion.cs
index 95b00e32eae2..193668f9ddb5 100644
--- a/osu.Game.Rulesets.Mania/Skinning/Legacy/LegacyHitExplosion.cs
+++ b/osu.Game.Rulesets.Mania/Skinning/Legacy/LegacyHitExplosion.cs
@@ -59,8 +59,7 @@ private void load(ISkinSource skin, IScrollingInfo scrollingInfo)
private void onDirectionChanged(ValueChangedEvent direction)
{
- if (explosion != null)
- explosion.Anchor = direction.NewValue == ScrollingDirection.Up ? Anchor.TopCentre : Anchor.BottomCentre;
+ explosion?.Anchor = direction.NewValue == ScrollingDirection.Up ? Anchor.TopCentre : Anchor.BottomCentre;
}
public void Animate(JudgementResult result)
diff --git a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
index a4ebb3347a42..0089154d3d1a 100644
--- a/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
+++ b/osu.Game.Rulesets.Mania/UI/ManiaPlayfield.cs
@@ -3,12 +3,12 @@
#nullable disable
-using osu.Framework.Graphics;
-using osu.Framework.Graphics.Containers;
using System;
using System.Collections.Generic;
using JetBrains.Annotations;
using osu.Framework.Allocation;
+using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.Objects;
diff --git a/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj b/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj
index 3bca9384506b..61caec5f96bf 100644
--- a/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj
+++ b/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
smash the keys. to the beat.
diff --git a/osu.Game.Rulesets.Osu.Tests.Android/AndroidManifest.xml b/osu.Game.Rulesets.Osu.Tests.Android/AndroidManifest.xml
index fb19e77dd02e..43f09bf97dac 100644
--- a/osu.Game.Rulesets.Osu.Tests.Android/AndroidManifest.xml
+++ b/osu.Game.Rulesets.Osu.Tests.Android/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/osu.Game.Rulesets.Osu.Tests.Android/osu.Game.Rulesets.Osu.Tests.Android.csproj b/osu.Game.Rulesets.Osu.Tests.Android/osu.Game.Rulesets.Osu.Tests.Android.csproj
index b79de6d40bda..7d2debac9daf 100644
--- a/osu.Game.Rulesets.Osu.Tests.Android/osu.Game.Rulesets.Osu.Tests.Android.csproj
+++ b/osu.Game.Rulesets.Osu.Tests.Android/osu.Game.Rulesets.Osu.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Rulesets.Osu.Tests
osu.Game.Rulesets.Osu.Tests.Android
@@ -22,6 +22,15 @@
-
+
+
+
+
+
+ XamarinJetbrainsAnnotations
+
+
+
diff --git a/osu.Game.Rulesets.Osu.Tests.iOS/osu.Game.Rulesets.Osu.Tests.iOS.csproj b/osu.Game.Rulesets.Osu.Tests.iOS/osu.Game.Rulesets.Osu.Tests.iOS.csproj
index cd4fbcc00e02..c2f34683a4bd 100644
--- a/osu.Game.Rulesets.Osu.Tests.iOS/osu.Game.Rulesets.Osu.Tests.iOS.csproj
+++ b/osu.Game.Rulesets.Osu.Tests.iOS/osu.Game.Rulesets.Osu.Tests.iOS.csproj
@@ -1,7 +1,7 @@
Exe
- net8.0-ios
+ net10.0-ios
13.4
Exe
osu.Game.Rulesets.Osu.Tests
@@ -19,6 +19,6 @@
-
+
diff --git a/osu.Game.Rulesets.Osu.Tests/Editor/Checks/CheckOsuAbnormalDifficultySettingsTest.cs b/osu.Game.Rulesets.Osu.Tests/Editor/Checks/CheckOsuAbnormalDifficultySettingsTest.cs
index 5f49714d9328..1426e009018d 100644
--- a/osu.Game.Rulesets.Osu.Tests/Editor/Checks/CheckOsuAbnormalDifficultySettingsTest.cs
+++ b/osu.Game.Rulesets.Osu.Tests/Editor/Checks/CheckOsuAbnormalDifficultySettingsTest.cs
@@ -1,14 +1,14 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Game.Rulesets.Osu.Edit.Checks;
+using System.Linq;
using NUnit.Framework;
using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Objects;
-using osu.Game.Rulesets.Edit.Checks;
using osu.Game.Rulesets.Edit;
+using osu.Game.Rulesets.Edit.Checks;
+using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Osu.Edit.Checks;
using osu.Game.Tests.Beatmaps;
-using System.Linq;
namespace osu.Game.Rulesets.Osu.Tests.Editor.Checks
{
diff --git a/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderSplitting.cs b/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderSplitting.cs
index d5bacc25bce6..e435b246d40e 100644
--- a/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderSplitting.cs
+++ b/osu.Game.Rulesets.Osu.Tests/Editor/TestSceneSliderSplitting.cs
@@ -67,7 +67,7 @@ public void TestBasicSplit()
moveMouseToControlPoint(2);
AddStep("select control point", () =>
{
- if (visualiser is not null) visualiser.Pieces[2].IsSelected.Value = true;
+ visualiser?.Pieces[2].IsSelected.Value = true;
});
addContextMenuItemStep("Split control point");
@@ -128,12 +128,12 @@ public void TestDoubleSplit()
moveMouseToControlPoint(2);
AddStep("select first control point", () =>
{
- if (visualiser is not null) visualiser.Pieces[2].IsSelected.Value = true;
+ visualiser?.Pieces[2].IsSelected.Value = true;
});
moveMouseToControlPoint(4);
AddStep("select second control point", () =>
{
- if (visualiser is not null) visualiser.Pieces[4].IsSelected.Value = true;
+ visualiser?.Pieces[4].IsSelected.Value = true;
});
addContextMenuItemStep("Split 2 control points");
@@ -193,7 +193,7 @@ public void TestSplitRetainsHitsounds()
moveMouseToControlPoint(2);
AddStep("select control point", () =>
{
- if (visualiser is not null) visualiser.Pieces[2].IsSelected.Value = true;
+ visualiser?.Pieces[2].IsSelected.Value = true;
});
addContextMenuItemStep("Split control point");
AddAssert("sliders have hitsounds", hasHitsounds);
diff --git a/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModAlternate.cs b/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModAlternate.cs
index 27ff26b43865..a924fe7fc110 100644
--- a/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModAlternate.cs
+++ b/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModAlternate.cs
@@ -168,7 +168,7 @@ public void TestInputSingularWithBreak([Values] bool pressBeforeSecondObject) =>
new OsuReplayFrame(2950, new Vector2(500, 100), OsuAction.LeftButton),
new OsuReplayFrame(2951, new Vector2(500, 100)),
}.Concat(!pressBeforeSecondObject
- ? Enumerable.Empty()
+ ? []
: new ReplayFrame[]
{
// press same key after break but before hit object.
diff --git a/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModNoScope.cs b/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModNoScope.cs
index b9559aeba357..a4eb818e9a54 100644
--- a/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModNoScope.cs
+++ b/osu.Game.Rulesets.Osu.Tests/Mods/TestSceneOsuModNoScope.cs
@@ -5,8 +5,8 @@
using System.Linq;
using NUnit.Framework;
using osu.Framework.Extensions.ObjectExtensions;
-using osu.Framework.Utils;
using osu.Framework.Testing;
+using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Timing;
using osu.Game.Rulesets.Objects;
diff --git a/osu.Game.Rulesets.Osu.Tests/StackingTest.cs b/osu.Game.Rulesets.Osu.Tests/StackingTest.cs
index 6daf5c59c6aa..ddfb719ab142 100644
--- a/osu.Game.Rulesets.Osu.Tests/StackingTest.cs
+++ b/osu.Game.Rulesets.Osu.Tests/StackingTest.cs
@@ -1,14 +1,12 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using osu.Game.Beatmaps;
using osu.Game.IO;
-using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Tests.Beatmaps;
using Decoder = osu.Game.Beatmaps.Formats.Decoder;
@@ -52,7 +50,7 @@ osu file format v14
using (var reader = new LineBufferedReader(stream))
{
var beatmap = Decoder.GetDecoder(reader).Decode(reader);
- var converted = new TestWorkingBeatmap(beatmap).GetPlayableBeatmap(new OsuRuleset().RulesetInfo, Array.Empty());
+ var converted = new TestWorkingBeatmap(beatmap).GetPlayableBeatmap(new OsuRuleset().RulesetInfo, []);
var objects = converted.HitObjects.ToList();
@@ -97,7 +95,7 @@ osu file format v14
using (var reader = new LineBufferedReader(stream))
{
var beatmap = Decoder.GetDecoder(reader).Decode(reader);
- var converted = new TestWorkingBeatmap(beatmap).GetPlayableBeatmap(new OsuRuleset().RulesetInfo, Array.Empty());
+ var converted = new TestWorkingBeatmap(beatmap).GetPlayableBeatmap(new OsuRuleset().RulesetInfo, []);
var objects = converted.HitObjects.ToList();
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneAimErrorMeter.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneAimErrorMeter.cs
index 65ab6e7e1523..9e01fc98ca03 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneAimErrorMeter.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneAimErrorMeter.cs
@@ -2,22 +2,22 @@
// See the LICENCE file in the repository root for full licence text.
using System;
+using NUnit.Framework;
+using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
-using osu.Framework.Testing;
-using osu.Game.Rulesets.Scoring;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
-using osu.Game.Tests.Visual;
-using osuTK;
-using osuTK.Graphics;
using osu.Framework.Input.Events;
-using osu.Game.Rulesets.Osu.Judgements;
-using osu.Game.Rulesets.Osu.Objects;
-using NUnit.Framework;
-using osu.Framework.Extensions.ObjectExtensions;
-using osu.Framework.Utils;
+using osu.Framework.Testing;
using osu.Framework.Threading;
+using osu.Framework.Utils;
using osu.Game.Rulesets.Osu.HUD;
+using osu.Game.Rulesets.Osu.Judgements;
+using osu.Game.Rulesets.Osu.Objects;
+using osu.Game.Rulesets.Scoring;
+using osu.Game.Tests.Visual;
+using osuTK;
+using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Tests
{
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneGameplayCursorSizeChange.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneGameplayCursorSizeChange.cs
index c94e575032bb..c1ee76ca9d95 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneGameplayCursorSizeChange.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneGameplayCursorSizeChange.cs
@@ -22,7 +22,7 @@ public partial class TestSceneGameplayCursorSizeChange : PlayerTestScene
[BackgroundDependencyLoader]
private void load()
{
- if (skins != null) skins.CurrentSkinInfo.Value = skins.DefaultClassicSkin.SkinInfo;
+ skins?.CurrentSkinInfo.Value = skins.DefaultClassicSkin.SkinInfo;
}
[SetUpSteps]
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLateFade.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLateFade.cs
index 838b426cb44b..723a7e800028 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLateFade.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLateFade.cs
@@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using System;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Extensions.ObjectExtensions;
@@ -86,7 +85,7 @@ public void TestHitCircleNoModMiss()
{
AddStep("Create hit circle", () =>
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
createCircle();
});
@@ -99,7 +98,7 @@ public void TestHitCircleNoModHit()
{
AddStep("Create hit circle", () =>
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
createCircle(true);
});
}
@@ -122,7 +121,7 @@ public void TestSliderNoMod()
{
AddStep("Create slider", () =>
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
createSlider();
});
@@ -138,9 +137,10 @@ private TestDrawableHitCircle createCircle(bool shouldHit = false)
{
StartTime = Time.Current + 500,
Position = new Vector2(250),
- }, shouldHit);
-
- drawableHitCircle.Scale = new Vector2(2f);
+ }, shouldHit)
+ {
+ Scale = new Vector2(2f)
+ };
LoadComponent(drawableHitCircle);
foreach (var mod in SelectedMods.Value.OfType())
@@ -172,9 +172,10 @@ private void createSlider()
Vector2.Zero,
new Vector2(0, 100),
})
- });
-
- drawableSlider.Scale = new Vector2(2f);
+ })
+ {
+ Scale = new Vector2(2f)
+ };
drawableSlider.HitObject.ApplyDefaults(new ControlPointInfo(), new BeatmapDifficulty());
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneSkinFallbacks.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSkinFallbacks.cs
index 9d79cb0db4de..d416a03d2cf1 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneSkinFallbacks.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSkinFallbacks.cs
@@ -152,7 +152,7 @@ public TestSource(string identifier)
public Drawable GetDrawableComponent(ISkinComponentLookup lookup)
{
- if (!enabled) return null;
+ if (!Enabled) return null;
if (lookup is OsuSkinComponentLookup osuComponent && osuComponent.Component == OsuSkinComponents.SliderBody)
return null;
@@ -177,20 +177,18 @@ public Drawable GetDrawableComponent(ISkinComponentLookup lookup)
[CanBeNull]
public event Action SourceChanged;
- private bool enabled = true;
-
public bool Enabled
{
- get => enabled;
+ get;
set
{
- if (value == enabled)
+ if (value == field)
return;
- enabled = value;
+ field = value;
SourceChanged?.Invoke();
}
- }
+ } = true;
}
}
}
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs
index b18c77e8ee75..5bef5e090b38 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs
@@ -5,29 +5,29 @@
using System;
using System.Collections.Generic;
-using osu.Framework.Graphics;
-using osu.Game.Audio;
-using osu.Game.Beatmaps;
-using osu.Game.Beatmaps.ControlPoints;
-using osu.Game.Rulesets.Osu.Objects;
-using osu.Game.Rulesets.Osu.Objects.Drawables;
-using osuTK;
-using osuTK.Graphics;
-using osu.Game.Rulesets.Mods;
using System.Linq;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
+using osu.Framework.Graphics;
using osu.Framework.Testing;
+using osu.Game.Audio;
+using osu.Game.Beatmaps;
+using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Judgements;
+using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Osu.Configuration;
using osu.Game.Rulesets.Osu.Mods;
+using osu.Game.Rulesets.Osu.Objects;
+using osu.Game.Rulesets.Osu.Objects.Drawables;
+using osuTK;
+using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Tests
{
@@ -51,7 +51,7 @@ protected override void LoadComplete()
snakingOut.Value = !v;
});
- AddToggleStep("toggle hidden", hiddenActive => SelectedMods.Value = hiddenActive ? new[] { new OsuModHidden() } : Array.Empty());
+ AddToggleStep("toggle hidden", hiddenActive => SelectedMods.Value = hiddenActive ? new[] { new OsuModHidden() } : []);
AddSliderStep("hit at", 0f, 1f, 0f, v =>
{
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerInput.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerInput.cs
index c4e643dcdfea..5e0b11cdee99 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerInput.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerInput.cs
@@ -11,7 +11,6 @@
using osu.Game.Beatmaps;
using osu.Game.Replays;
using osu.Game.Rulesets.Judgements;
-using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables;
@@ -51,7 +50,7 @@ protected override WorkingBeatmap CreateWorkingBeatmap(IBeatmap beatmap, Storybo
public void Setup() => Schedule(() =>
{
manualClock = null;
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
});
///
diff --git a/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj b/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
index 15dca424f32d..e259e9847f9e 100644
--- a/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
+++ b/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
@@ -4,11 +4,11 @@
-
+
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapConverter.cs b/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapConverter.cs
index aa8326c60cb3..45c4e763691b 100644
--- a/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapConverter.cs
+++ b/osu.Game.Rulesets.Osu/Beatmaps/OsuBeatmapConverter.cs
@@ -1,17 +1,17 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osuTK;
-using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Objects;
-using osu.Game.Rulesets.Osu.Objects;
using System.Collections.Generic;
-using osu.Game.Rulesets.Objects.Types;
using System.Linq;
using System.Threading;
-using osu.Game.Rulesets.Osu.UI;
using osu.Framework.Extensions.IEnumerableExtensions;
+using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Legacy;
+using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Objects.Types;
+using osu.Game.Rulesets.Osu.Objects;
+using osu.Game.Rulesets.Osu.UI;
+using osuTK;
namespace osu.Game.Rulesets.Osu.Beatmaps
{
diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs
index 741ddb3d4fdd..e1a520fe072e 100644
--- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs
+++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs
@@ -5,12 +5,12 @@
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
+using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Difficulty.Utils;
using osu.Game.Rulesets.Mods;
-using osu.Game.Rulesets.Osu.Scoring;
-using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Osu.Difficulty.Skills;
using osu.Game.Rulesets.Osu.Mods;
+using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Utils;
diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs
index 6823512cef12..6156fbe4d071 100644
--- a/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs
+++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/OsuStrainSkill.cs
@@ -3,10 +3,10 @@
using System;
using System.Collections.Generic;
-using osu.Game.Rulesets.Difficulty.Skills;
-using osu.Game.Rulesets.Mods;
using System.Linq;
using osu.Framework.Utils;
+using osu.Game.Rulesets.Difficulty.Skills;
+using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
{
diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs
index 8fe3df43470e..09592e4bd15f 100644
--- a/osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs
+++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs
@@ -3,13 +3,13 @@
using System;
using System.Collections.Generic;
+using System.Linq;
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.Difficulty.Evaluators;
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
-using osu.Game.Rulesets.Osu.Objects;
-using System.Linq;
using osu.Game.Rulesets.Osu.Difficulty.Utils;
+using osu.Game.Rulesets.Osu.Objects;
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
{
diff --git a/osu.Game.Rulesets.Osu/Edit/Checks/CheckOsuAbnormalDifficultySettings.cs b/osu.Game.Rulesets.Osu/Edit/Checks/CheckOsuAbnormalDifficultySettings.cs
index a53c6bf7a15e..0534ec0b48bc 100644
--- a/osu.Game.Rulesets.Osu/Edit/Checks/CheckOsuAbnormalDifficultySettings.cs
+++ b/osu.Game.Rulesets.Osu/Edit/Checks/CheckOsuAbnormalDifficultySettings.cs
@@ -15,9 +15,8 @@ public class CheckOsuAbnormalDifficultySettings : CheckAbnormalDifficultySetting
public override IEnumerable Run(BeatmapVerifierContext context)
{
var diff = context.CurrentDifficulty.Playable.Difficulty;
- Issue? issue;
- if (HasMoreThanOneDecimalPlace("Approach rate", diff.ApproachRate, out issue))
+ if (HasMoreThanOneDecimalPlace("Approach rate", diff.ApproachRate, out var issue))
yield return issue;
if (OutOfRange("Approach rate", diff.ApproachRate, out issue))
diff --git a/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs b/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs
index 6ff762b82f06..98645fa54725 100644
--- a/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs
+++ b/osu.Game.Rulesets.Osu/Edit/OsuHitObjectComposer.cs
@@ -347,7 +347,7 @@ private void updateDistanceSnapGrid()
if (!CursorInPlacementArea)
return;
- distanceSnapGrid = createDistanceSnapGrid(Enumerable.Empty());
+ distanceSnapGrid = createDistanceSnapGrid([]);
break;
}
diff --git a/osu.Game.Rulesets.Osu/Edit/PreciseMovementPopover.cs b/osu.Game.Rulesets.Osu/Edit/PreciseMovementPopover.cs
index caac51632b13..a1200f507d64 100644
--- a/osu.Game.Rulesets.Osu/Edit/PreciseMovementPopover.cs
+++ b/osu.Game.Rulesets.Osu/Edit/PreciseMovementPopover.cs
@@ -8,13 +8,13 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions;
-using osu.Game.Graphics.UserInterfaceV2;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Input.Events;
using osu.Game.Extensions;
using osu.Game.Graphics.UserInterface;
+using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Input.Bindings;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Types;
diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs b/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs
index 65ab6001c983..0b3eb14c9f64 100644
--- a/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs
+++ b/osu.Game.Rulesets.Osu/Mods/OsuModDifficultyAdjust.cs
@@ -53,7 +53,7 @@ public override string ExtendedIconInformation
return string.Empty;
- string format(string acronym, DifficultyBindable bindable)
+ static string format(string acronym, DifficultyBindable bindable)
=> $"{acronym}{bindable.Value!.Value.ToStandardFormattedString(1)}";
}
}
@@ -93,7 +93,7 @@ private partial class ApproachRateSettingsControl : DifficultyAdjustSettingsCont
public partial class ApproachRateSlider : RoundedSliderBar
{
public override LocalisableString TooltipText =>
- (Current as BindableNumber)?.MinValue < 0
+ Current is BindableNumber { MinValue: < 0 }
? $"{base.TooltipText} ({getPreemptTime(Current.Value):0} ms)"
: base.TooltipText;
diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModHidden.cs b/osu.Game.Rulesets.Osu/Mods/OsuModHidden.cs
index c9b5fb29f776..1224d2a04f8c 100644
--- a/osu.Game.Rulesets.Osu/Mods/OsuModHidden.cs
+++ b/osu.Game.Rulesets.Osu/Mods/OsuModHidden.cs
@@ -4,16 +4,16 @@
using System;
using System.Diagnostics;
using System.Linq;
-using osu.Framework.Graphics;
using osu.Framework.Bindables;
+using osu.Framework.Graphics;
using osu.Framework.Localisation;
-using osu.Game.Configuration;
using osu.Game.Beatmaps;
+using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Drawables;
-using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Rulesets.Osu.Objects;
+using osu.Game.Rulesets.Osu.Objects.Drawables;
using osu.Game.Rulesets.Osu.Skinning;
namespace osu.Game.Rulesets.Osu.Mods
diff --git a/osu.Game.Rulesets.Osu/Mods/OsuModStrictTracking.cs b/osu.Game.Rulesets.Osu/Mods/OsuModStrictTracking.cs
index 16ef63938467..06d49849bc10 100644
--- a/osu.Game.Rulesets.Osu/Mods/OsuModStrictTracking.cs
+++ b/osu.Game.Rulesets.Osu/Mods/OsuModStrictTracking.cs
@@ -43,7 +43,7 @@ public void ApplyToDrawableHitObject(DrawableHitObject drawable)
if (slider.Time.Current < slider.HitObject.StartTime)
return;
- if ((slider.Clock as IGameplayClock)?.IsRewinding == true)
+ if (slider.Clock is IGameplayClock { IsRewinding: true })
return;
var tail = slider.NestedHitObjects.OfType().First();
diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPoint.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPoint.cs
index 52edfb1422af..9eb54c3d36e5 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPoint.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPoint.cs
@@ -2,8 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables;
-using osuTK;
-using osuTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -11,6 +9,8 @@
using osu.Framework.Graphics.Pooling;
using osu.Framework.Graphics.Shapes;
using osu.Game.Skinning;
+using osuTK;
+using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
{
diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPointLifetimeEntry.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPointLifetimeEntry.cs
index cbec5efda7e3..c26a2393b77c 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPointLifetimeEntry.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Connections/FollowPointLifetimeEntry.cs
@@ -21,16 +21,14 @@ public FollowPointLifetimeEntry(OsuHitObject start)
LifetimeStart = Start.StartTime;
}
- private OsuHitObject? end;
-
public OsuHitObject? End
{
- get => end;
+ get;
set
{
UnbindEvents();
- end = value;
+ field = value;
bindEvents();
diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs
index b29be97951b6..d9fabd9d103b 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableOsuHitObject.cs
@@ -74,7 +74,7 @@ protected override void OnFree()
ScaleBindable.UnbindFrom(HitObject.ScaleBindable);
}
- protected virtual IEnumerable DimmablePieces => Enumerable.Empty();
+ protected virtual IEnumerable DimmablePieces => [];
protected override void UpdateInitialTransforms()
{
@@ -123,8 +123,7 @@ private void applyDim(Drawable piece)
protected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;
- private OsuInputManager osuActionInputManager;
- internal OsuInputManager OsuActionInputManager => osuActionInputManager ??= GetContainingInputManager() as OsuInputManager;
+ internal OsuInputManager OsuActionInputManager => field ??= GetContainingInputManager() as OsuInputManager;
///
/// Shake the hit object in case it was clicked far too early or late (aka "note lock").
diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTick.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTick.cs
index 73c061afbdae..cf01016012af 100644
--- a/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTick.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Drawables/DrawableSliderTick.cs
@@ -5,12 +5,12 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
+using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets.Objects.Drawables;
+using osu.Game.Skinning;
using osuTK;
using osuTK.Graphics;
-using osu.Framework.Graphics.Shapes;
-using osu.Game.Skinning;
-using osu.Framework.Graphics.Containers;
namespace osu.Game.Rulesets.Osu.Objects.Drawables
{
diff --git a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs
index 0a5365e652eb..f40060af5c18 100644
--- a/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs
+++ b/osu.Game.Rulesets.Osu/Objects/OsuHitObject.cs
@@ -199,8 +199,7 @@ public void UpdateComboInformation(IHasComboInformation? lastObj)
index++;
indexWithOffsets += ComboOffset + 1;
- if (lastObj != null)
- lastObj.LastInCombo = true;
+ lastObj?.LastInCombo = true;
}
ComboIndex = index;
diff --git a/osu.Game.Rulesets.Osu/Objects/Slider.cs b/osu.Game.Rulesets.Osu/Objects/Slider.cs
index 94e98fbef71b..875c9d74bf42 100644
--- a/osu.Game.Rulesets.Osu/Objects/Slider.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Slider.cs
@@ -3,10 +3,7 @@
#nullable disable
-using osuTK;
-using osu.Game.Rulesets.Objects.Types;
using System.Collections.Generic;
-using osu.Game.Rulesets.Objects;
using System.Linq;
using System.Threading;
using JetBrains.Annotations;
@@ -17,9 +14,12 @@
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Judgements;
+using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Legacy;
+using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Osu.Judgements;
using osu.Game.Rulesets.Scoring;
+using osuTK;
namespace osu.Game.Rulesets.Osu.Objects
{
@@ -42,19 +42,17 @@ public double Duration
public Vector2 StackedPositionAt(double t) => StackedPosition + this.CurvePositionAt(t);
- private readonly SliderPath path = new SliderPath { OptimiseCatmull = true };
-
public SliderPath Path
{
- get => path;
+ get;
set
{
- path.ControlPoints.Clear();
- path.ControlPoints.AddRange(value.ControlPoints.Select(c => new PathControlPoint(c.Position, c.Type)));
+ field.ControlPoints.Clear();
+ field.ControlPoints.AddRange(value.ControlPoints.Select(c => new PathControlPoint(c.Position, c.Type)));
- path.ExpectedDistance.Value = value.ExpectedDistance.Value;
+ field.ExpectedDistance.Value = value.ExpectedDistance.Value;
}
- }
+ } = new SliderPath { OptimiseCatmull = true };
public double Distance => Path.Distance;
@@ -73,14 +71,12 @@ public override Vector2 Position
[JsonIgnore]
public IList TailSamples { get; private set; }
- private int repeatCount;
-
public int RepeatCount
{
- get => repeatCount;
+ get;
set
{
- repeatCount = value;
+ field = value;
updateNestedPositions();
}
}
@@ -112,19 +108,15 @@ public int RepeatCount
///
public bool ClassicSliderBehaviour
{
- get => classicSliderBehaviour;
+ get;
set
{
- classicSliderBehaviour = value;
- if (HeadCircle != null)
- HeadCircle.ClassicSliderBehaviour = value;
- if (TailCircle != null)
- TailCircle.ClassicSliderBehaviour = value;
+ field = value;
+ HeadCircle?.ClassicSliderBehaviour = value;
+ TailCircle?.ClassicSliderBehaviour = value;
}
}
- private bool classicSliderBehaviour;
-
public BindableNumber SliderVelocityMultiplierBindable { get; } = new BindableDouble(1)
{
MinValue = 0.1,
@@ -279,14 +271,13 @@ protected void UpdateNestedSamples()
}
}
- if (HeadCircle != null)
- HeadCircle.Samples = this.GetNodeSamples(0);
+ HeadCircle?.Samples = this.GetNodeSamples(0);
// The samples should be attached to the slider tail, however this can only be done if LastTick is removed otherwise they would play earlier than they're intended to.
// (see mapping logic in `CreateNestedHitObjects` above)
//
// For now, the samples are played by the slider itself at the correct end time.
- TailSamples = this.GetNodeSamples(repeatCount + 1);
+ TailSamples = this.GetNodeSamples(RepeatCount + 1);
}
public override Judgement CreateJudgement() => ClassicSliderBehaviour
diff --git a/osu.Game.Rulesets.Osu/Objects/Spinner.cs b/osu.Game.Rulesets.Osu/Objects/Spinner.cs
index 6f6b848b3811..23ac501981d8 100644
--- a/osu.Game.Rulesets.Osu/Objects/Spinner.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Spinner.cs
@@ -106,7 +106,7 @@ public HitSampleInfo[] CreateSpinningSamples()
var referenceSample = Samples.FirstOrDefault();
if (referenceSample == null)
- return Array.Empty();
+ return [];
return new[]
{
diff --git a/osu.Game.Rulesets.Osu/OsuInputManager.cs b/osu.Game.Rulesets.Osu/OsuInputManager.cs
index 65bd585e9845..3c15287d5358 100644
--- a/osu.Game.Rulesets.Osu/OsuInputManager.cs
+++ b/osu.Game.Rulesets.Osu/OsuInputManager.cs
@@ -69,8 +69,6 @@ protected override bool Handle(UIEvent e)
private partial class OsuKeyBindingContainer : RulesetKeyBindingContainer
{
- private bool allowGameplayInputs = true;
-
///
/// Whether gameplay input buttons should be allowed.
/// Defaults to true, generally used for mods like Relax which turn off main inputs.
@@ -80,13 +78,13 @@ private partial class OsuKeyBindingContainer : RulesetKeyBindingContainer
///
public bool AllowGameplayInputs
{
- get => allowGameplayInputs;
+ get;
set
{
- allowGameplayInputs = value;
+ field = value;
ReloadMappings();
}
- }
+ } = true;
public OsuKeyBindingContainer(RulesetInfo ruleset, int variant, SimultaneousBindingMode unique)
: base(ruleset, variant, unique)
diff --git a/osu.Game.Rulesets.Osu/OsuRuleset.cs b/osu.Game.Rulesets.Osu/OsuRuleset.cs
index f0c4e7441063..0253ff77d350 100644
--- a/osu.Game.Rulesets.Osu/OsuRuleset.cs
+++ b/osu.Game.Rulesets.Osu/OsuRuleset.cs
@@ -230,7 +230,7 @@ public override IEnumerable GetModsFor(ModType type)
};
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/osu.Game.Rulesets.Osu/Replays/OsuAutoGenerator.cs b/osu.Game.Rulesets.Osu/Replays/OsuAutoGenerator.cs
index f08e8133230c..8233802e285d 100644
--- a/osu.Game.Rulesets.Osu/Replays/OsuAutoGenerator.cs
+++ b/osu.Game.Rulesets.Osu/Replays/OsuAutoGenerator.cs
@@ -1,21 +1,21 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osuTK;
-using osu.Framework.Utils;
-using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Osu.Objects;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using osu.Framework.Graphics;
+using osu.Framework.Utils;
+using osu.Game.Beatmaps;
using osu.Game.Replays;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Beatmaps;
+using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Scoring;
using osu.Game.Rulesets.Scoring;
+using osuTK;
namespace osu.Game.Rulesets.Osu.Replays
{
diff --git a/osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs b/osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs
index 74e16f7e0b09..a545a2819940 100644
--- a/osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs
+++ b/osu.Game.Rulesets.Osu/Replays/OsuAutoGeneratorBase.cs
@@ -1,15 +1,15 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osuTK;
-using osu.Game.Beatmaps;
using System;
using System.Collections.Generic;
using System.Linq;
+using osu.Game.Beatmaps;
using osu.Game.Replays;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Osu.UI;
using osu.Game.Rulesets.Replays;
+using osuTK;
namespace osu.Game.Rulesets.Osu.Replays
{
diff --git a/osu.Game.Rulesets.Osu/Skinning/Argon/ArgonSliderBall.cs b/osu.Game.Rulesets.Osu/Skinning/Argon/ArgonSliderBall.cs
index 325f0a22adce..360a2a5aab42 100644
--- a/osu.Game.Rulesets.Osu/Skinning/Argon/ArgonSliderBall.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/Argon/ArgonSliderBall.cs
@@ -118,8 +118,7 @@ protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
- if (parentObject != null)
- parentObject.ApplyCustomUpdateState -= updateStateTransforms;
+ parentObject?.ApplyCustomUpdateState -= updateStateTransforms;
}
}
}
diff --git a/osu.Game.Rulesets.Osu/Skinning/Default/DefaultSliderBall.cs b/osu.Game.Rulesets.Osu/Skinning/Default/DefaultSliderBall.cs
index c911943bfb2d..9e964dcdef03 100644
--- a/osu.Game.Rulesets.Osu/Skinning/Default/DefaultSliderBall.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/Default/DefaultSliderBall.cs
@@ -104,8 +104,7 @@ protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
- if (parentObject != null)
- parentObject.ApplyCustomUpdateState -= updateStateTransforms;
+ parentObject?.ApplyCustomUpdateState -= updateStateTransforms;
}
}
}
diff --git a/osu.Game.Rulesets.Osu/Skinning/Default/DrawableSliderPath.cs b/osu.Game.Rulesets.Osu/Skinning/Default/DrawableSliderPath.cs
index 6f41d33c3d39..a5f1189eeb59 100644
--- a/osu.Game.Rulesets.Osu/Skinning/Default/DrawableSliderPath.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/Default/DrawableSliderPath.cs
@@ -46,24 +46,22 @@ public Color4 AccentColour
}
}
- private float borderSize = 1;
-
public float BorderSize
{
- get => borderSize;
+ get;
set
{
- if (borderSize == value)
+ if (field == value)
return;
if (value < border_min_size || value > border_max_size)
return;
- borderSize = value;
+ field = value;
InvalidateTexture();
}
- }
+ } = 1;
protected float CalculatedBorderPortion => BorderSize * BORDER_PORTION;
}
diff --git a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorParticles.cs b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorParticles.cs
index e022e5534d35..afb80e89cb8e 100644
--- a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorParticles.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorParticles.cs
@@ -45,11 +45,8 @@ private void load(ISkinSource skin)
var texture = skin.GetTexture("star2");
var starBreakAdditive = skin.GetConfig(OsuSkinColour.StarBreakAdditive)?.Value ?? new Color4(255, 182, 193, 255);
- if (texture != null)
- {
- // stable "magic ratio". see OsuPlayfieldAdjustmentContainer for full explanation.
- texture.ScaleAdjust *= 1.6f;
- }
+ // stable "magic ratio". see OsuPlayfieldAdjustmentContainer for full explanation.
+ texture?.ScaleAdjust *= 1.6f;
InternalChildren = new[]
{
diff --git a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorTrail.cs b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorTrail.cs
index 375bef721de5..adc683f066f8 100644
--- a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorTrail.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyCursorTrail.cs
@@ -56,11 +56,8 @@ private void load(OsuConfigManager config, ISkinSource skinSource)
Blending = BlendingParameters.Additive;
}
- if (Texture != null)
- {
- // stable "magic ratio". see OsuPlayfieldAdjustmentContainer for full explanation.
- Texture.ScaleAdjust *= 1.6f;
- }
+ // stable "magic ratio". see OsuPlayfieldAdjustmentContainer for full explanation.
+ Texture?.ScaleAdjust *= 1.6f;
}
protected override double FadeDuration => DisjointTrail ? 150 : 500;
diff --git a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyMainCirclePiece.cs b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyMainCirclePiece.cs
index e74ffaac0c3c..1279d6953a67 100644
--- a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyMainCirclePiece.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacyMainCirclePiece.cs
@@ -194,8 +194,7 @@ protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
- if (drawableObject != null)
- drawableObject.ApplyCustomUpdateState -= updateStateTransforms;
+ drawableObject?.ApplyCustomUpdateState -= updateStateTransforms;
}
}
}
diff --git a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySliderBall.cs b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySliderBall.cs
index 45c59e970bb5..89a558e81bb0 100644
--- a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySliderBall.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySliderBall.cs
@@ -71,8 +71,7 @@ private void load()
},
};
- if (parentObject != null)
- parentObject.HitObjectApplied += onHitObjectApplied;
+ parentObject?.HitObjectApplied += onHitObjectApplied;
onHitObjectApplied(parentObject);
}
diff --git a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySliderHeadHitCircle.cs b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySliderHeadHitCircle.cs
index bc69e66fb310..36f736ec8a51 100644
--- a/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySliderHeadHitCircle.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/Legacy/LegacySliderHeadHitCircle.cs
@@ -46,8 +46,7 @@ protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
- if (drawableHitObject != null)
- drawableHitObject.HitObjectApplied -= onHitObjectApplied;
+ drawableHitObject?.HitObjectApplied -= onHitObjectApplied;
}
}
}
diff --git a/osu.Game.Rulesets.Osu/Skinning/NonPlayfieldSprite.cs b/osu.Game.Rulesets.Osu/Skinning/NonPlayfieldSprite.cs
index 548a14f5eb44..937149ac0e61 100644
--- a/osu.Game.Rulesets.Osu/Skinning/NonPlayfieldSprite.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/NonPlayfieldSprite.cs
@@ -18,9 +18,8 @@ public override Texture? Texture
get => base.Texture;
set
{
- if (value != null)
- // stable "magic ratio". see OsuPlayfieldAdjustmentContainer for full explanation.
- value.ScaleAdjust *= 1.6f;
+ // stable "magic ratio". see OsuPlayfieldAdjustmentContainer for full explanation.
+ value?.ScaleAdjust *= 1.6f;
base.Texture = value;
}
}
diff --git a/osu.Game.Rulesets.Osu/Skinning/SliderBody.cs b/osu.Game.Rulesets.Osu/Skinning/SliderBody.cs
index e7885e65def7..d7818cb1dc98 100644
--- a/osu.Game.Rulesets.Osu/Skinning/SliderBody.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/SliderBody.cs
@@ -3,7 +3,6 @@
#nullable disable
-using System;
using System.Collections.Generic;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -98,7 +97,7 @@ public virtual void RecyclePath()
p.AccentColour = path?.AccentColour ?? Color4.White;
p.BorderColour = path?.BorderColour ?? Color4.White;
p.BorderSize = path?.BorderSize ?? 1;
- p.Vertices = path?.Vertices ?? Array.Empty();
+ p.Vertices = path?.Vertices ?? [];
});
}
diff --git a/osu.Game.Rulesets.Osu/UI/Cursor/CursorRippleVisualiser.cs b/osu.Game.Rulesets.Osu/UI/Cursor/CursorRippleVisualiser.cs
index d898f1a1a815..f848b34596c6 100644
--- a/osu.Game.Rulesets.Osu/UI/Cursor/CursorRippleVisualiser.cs
+++ b/osu.Game.Rulesets.Osu/UI/Cursor/CursorRippleVisualiser.cs
@@ -40,7 +40,7 @@ private void load(OsuRulesetConfigManager? rulesetConfig)
public bool OnPressed(KeyBindingPressEvent e)
{
- if ((Clock as IGameplayClock)?.IsRewinding == true)
+ if (Clock is IGameplayClock { IsRewinding: true })
return false;
if (showRipples.Value)
diff --git a/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs b/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
index 8ddb599c2e42..9024f1715d29 100644
--- a/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
+++ b/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs
@@ -66,16 +66,15 @@ public Vector2 CursorScale
///
protected Anchor TrailOrigin
{
- get => trailOrigin;
+ get;
set
{
- trailOrigin = value;
+ field = value;
Invalidate(Invalidation.DrawNode);
}
- }
+ } = Anchor.Centre;
private readonly TrailPart[] parts = new TrailPart[max_sprites];
- private Anchor trailOrigin = Anchor.Centre;
private int currentIndex;
private IShader shader;
private double timeOffset;
diff --git a/osu.Game.Rulesets.Osu/UI/ReplayAnalysisOverlay.cs b/osu.Game.Rulesets.Osu/UI/ReplayAnalysisOverlay.cs
index 2b7f6c9fc96d..883a94aa2582 100644
--- a/osu.Game.Rulesets.Osu/UI/ReplayAnalysisOverlay.cs
+++ b/osu.Game.Rulesets.Osu/UI/ReplayAnalysisOverlay.cs
@@ -67,9 +67,9 @@ protected override void Update()
if (requireDisplay)
initialise();
- if (ClickMarkers != null) ClickMarkers.Alpha = showClickMarkers.Value ? 1 : 0;
- if (FrameMarkers != null) FrameMarkers.Alpha = showFrameMarkers.Value ? 1 : 0;
- if (CursorPath != null) CursorPath.Alpha = showCursorPath.Value ? 1 : 0;
+ ClickMarkers?.Alpha = showClickMarkers.Value ? 1 : 0;
+ FrameMarkers?.Alpha = showFrameMarkers.Value ? 1 : 0;
+ CursorPath?.Alpha = showCursorPath.Value ? 1 : 0;
}
private void initialise()
diff --git a/osu.Game.Rulesets.Osu/Utils/OsuHitObjectGenerationUtils.cs b/osu.Game.Rulesets.Osu/Utils/OsuHitObjectGenerationUtils.cs
index f27624a63388..dcd15ef8e87c 100644
--- a/osu.Game.Rulesets.Osu/Utils/OsuHitObjectGenerationUtils.cs
+++ b/osu.Game.Rulesets.Osu/Utils/OsuHitObjectGenerationUtils.cs
@@ -3,10 +3,10 @@
using System;
using System.Linq;
-using osu.Game.Rulesets.Osu.UI;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Osu.Beatmaps;
using osu.Game.Rulesets.Osu.Objects;
+using osu.Game.Rulesets.Osu.UI;
using osuTK;
namespace osu.Game.Rulesets.Osu.Utils
diff --git a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj
index 7817d55f57ce..a9362e980a0f 100644
--- a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj
+++ b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
click the circles. to the beat.
diff --git a/osu.Game.Rulesets.Taiko.Tests.Android/AndroidManifest.xml b/osu.Game.Rulesets.Taiko.Tests.Android/AndroidManifest.xml
index 0bb6fd9130bc..2ec118692332 100644
--- a/osu.Game.Rulesets.Taiko.Tests.Android/AndroidManifest.xml
+++ b/osu.Game.Rulesets.Taiko.Tests.Android/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/osu.Game.Rulesets.Taiko.Tests.Android/osu.Game.Rulesets.Taiko.Tests.Android.csproj b/osu.Game.Rulesets.Taiko.Tests.Android/osu.Game.Rulesets.Taiko.Tests.Android.csproj
index 88aa137797a6..af2111d0905a 100644
--- a/osu.Game.Rulesets.Taiko.Tests.Android/osu.Game.Rulesets.Taiko.Tests.Android.csproj
+++ b/osu.Game.Rulesets.Taiko.Tests.Android/osu.Game.Rulesets.Taiko.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Rulesets.Taiko.Tests
osu.Game.Rulesets.Taiko.Tests.Android
@@ -22,4 +22,13 @@
+
+
+
+
+ XamarinJetbrainsAnnotations
+
+
+
diff --git a/osu.Game.Rulesets.Taiko.Tests.iOS/osu.Game.Rulesets.Taiko.Tests.iOS.csproj b/osu.Game.Rulesets.Taiko.Tests.iOS/osu.Game.Rulesets.Taiko.Tests.iOS.csproj
index 46ac59a1e782..4449c478489b 100644
--- a/osu.Game.Rulesets.Taiko.Tests.iOS/osu.Game.Rulesets.Taiko.Tests.iOS.csproj
+++ b/osu.Game.Rulesets.Taiko.Tests.iOS/osu.Game.Rulesets.Taiko.Tests.iOS.csproj
@@ -1,7 +1,7 @@
Exe
- net8.0-ios
+ net10.0-ios
13.4
osu.Game.Rulesets.Taiko.Tests
osu.Game.Rulesets.Taiko.Tests.iOS
diff --git a/osu.Game.Rulesets.Taiko.Tests/Editor/Checks/CheckTaikoAbnormalDifficultySettingsTest.cs b/osu.Game.Rulesets.Taiko.Tests/Editor/Checks/CheckTaikoAbnormalDifficultySettingsTest.cs
index 6a50fd095627..e9ec4a6112bb 100644
--- a/osu.Game.Rulesets.Taiko.Tests/Editor/Checks/CheckTaikoAbnormalDifficultySettingsTest.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/Editor/Checks/CheckTaikoAbnormalDifficultySettingsTest.cs
@@ -1,14 +1,14 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Game.Rulesets.Taiko.Edit.Checks;
+using System.Linq;
using NUnit.Framework;
using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Objects;
-using osu.Game.Rulesets.Edit.Checks;
using osu.Game.Rulesets.Edit;
+using osu.Game.Rulesets.Edit.Checks;
+using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Taiko.Edit.Checks;
using osu.Game.Tests.Beatmaps;
-using System.Linq;
namespace osu.Game.Rulesets.Taiko.Tests.Editor.Checks
{
diff --git a/osu.Game.Rulesets.Taiko.Tests/Editor/Checks/CheckTaikoInconsistentSkipBarLineTest.cs b/osu.Game.Rulesets.Taiko.Tests/Editor/Checks/CheckTaikoInconsistentSkipBarLineTest.cs
index 7ebbde03609f..af77cd8bf142 100644
--- a/osu.Game.Rulesets.Taiko.Tests/Editor/Checks/CheckTaikoInconsistentSkipBarLineTest.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/Editor/Checks/CheckTaikoInconsistentSkipBarLineTest.cs
@@ -5,9 +5,9 @@
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
-using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Taiko.Edit.Checks;
using osu.Game.Tests.Beatmaps;
diff --git a/osu.Game.Rulesets.Taiko.Tests/Judgements/JudgementTest.cs b/osu.Game.Rulesets.Taiko.Tests/Judgements/JudgementTest.cs
index 30ecec23667e..00eeb4394814 100644
--- a/osu.Game.Rulesets.Taiko.Tests/Judgements/JudgementTest.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/Judgements/JudgementTest.cs
@@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using System;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
@@ -44,7 +43,7 @@ protected void PerformTest(List frames, Beatmap? be
{
Beatmap.Value = CreateWorkingBeatmap(beatmap);
Ruleset.Value = new TaikoRuleset().RulesetInfo;
- SelectedMods.Value = mods ?? Array.Empty();
+ SelectedMods.Value = mods ?? [];
var p = new ScoreAccessibleReplayPlayer(new Score { Replay = new Replay { Frames = frames } });
diff --git a/osu.Game.Rulesets.Taiko.Tests/Mods/TestSceneTaikoModRelax.cs b/osu.Game.Rulesets.Taiko.Tests/Mods/TestSceneTaikoModRelax.cs
index fffe42f1f8b4..e67d84945e93 100644
--- a/osu.Game.Rulesets.Taiko.Tests/Mods/TestSceneTaikoModRelax.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/Mods/TestSceneTaikoModRelax.cs
@@ -34,7 +34,7 @@ public void TestRelax()
PassCondition = () => Player.ScoreProcessor.HasCompleted.Value && Player.ScoreProcessor.Accuracy.Value == 1,
});
- TaikoBeatmap createBeatmap() => new TaikoBeatmap
+ static TaikoBeatmap createBeatmap() => new TaikoBeatmap
{
HitObjects =
{
diff --git a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneTaikoKiaiGlow.cs b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneTaikoKiaiGlow.cs
index a5e2eb0dbba9..765ffaa43184 100644
--- a/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneTaikoKiaiGlow.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/Skinning/TestSceneTaikoKiaiGlow.cs
@@ -2,8 +2,8 @@
// See the LICENCE file in the repository root for full licence text.
using NUnit.Framework;
-using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Beatmaps;
+using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Rulesets.Taiko.Skinning.Legacy;
namespace osu.Game.Rulesets.Taiko.Tests.Skinning
diff --git a/osu.Game.Rulesets.Taiko.Tests/TaikoBeatmapConversionTest.cs b/osu.Game.Rulesets.Taiko.Tests/TaikoBeatmapConversionTest.cs
index a528a7f9d1b4..2c96cf8cb6b9 100644
--- a/osu.Game.Rulesets.Taiko.Tests/TaikoBeatmapConversionTest.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/TaikoBeatmapConversionTest.cs
@@ -32,11 +32,11 @@ protected override IEnumerable CreateConvertValue(HitObject hitObj
{
StartTime = hitObject.StartTime,
EndTime = hitObject.GetEndTime(),
- IsRim = (hitObject as Hit)?.Type == HitType.Rim,
- IsCentre = (hitObject as Hit)?.Type == HitType.Centre,
+ IsRim = hitObject is Hit { Type: HitType.Rim },
+ IsCentre = hitObject is Hit { Type: HitType.Centre },
IsDrumRoll = hitObject is DrumRoll,
IsSwell = hitObject is Swell,
- IsStrong = (hitObject as TaikoStrongableHitObject)?.IsStrong == true
+ IsStrong = hitObject is TaikoStrongableHitObject { IsStrong: true }
};
}
diff --git a/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj b/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
index facb0d0cfbce..ae742a661343 100644
--- a/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
+++ b/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
@@ -3,11 +3,11 @@
-
+
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs b/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs
index 7d66820e5a87..c6d31d1e77dc 100644
--- a/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs
+++ b/osu.Game.Rulesets.Taiko/Beatmaps/TaikoBeatmapConverter.cs
@@ -1,18 +1,18 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Objects;
-using osu.Game.Rulesets.Objects.Types;
-using osu.Game.Rulesets.Taiko.Objects;
using System;
using System.Collections.Generic;
using System.Linq;
-using osu.Framework.Utils;
using System.Threading;
+using osu.Framework.Utils;
using osu.Game.Audio;
+using osu.Game.Beatmaps;
using osu.Game.Beatmaps.ControlPoints;
+using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Objects.Legacy;
+using osu.Game.Rulesets.Objects.Types;
+using osu.Game.Rulesets.Taiko.Objects;
namespace osu.Game.Rulesets.Taiko.Beatmaps
{
diff --git a/osu.Game.Rulesets.Taiko/Difficulty/Evaluators/StaminaEvaluator.cs b/osu.Game.Rulesets.Taiko/Difficulty/Evaluators/StaminaEvaluator.cs
index 32ed8ec1896f..825f2b20636f 100644
--- a/osu.Game.Rulesets.Taiko/Difficulty/Evaluators/StaminaEvaluator.cs
+++ b/osu.Game.Rulesets.Taiko/Difficulty/Evaluators/StaminaEvaluator.cs
@@ -24,11 +24,10 @@ public static double EvaluateDifficultyOf(DifficultyHitObject current)
// Find the previous hit object hit by the current finger, which is n notes prior, n being the number of
// available fingers.
TaikoDifficultyHitObject taikoCurrent = (TaikoDifficultyHitObject)current;
- TaikoDifficultyHitObject? taikoPrevious = current.Previous(1) as TaikoDifficultyHitObject;
TaikoDifficultyHitObject? previousMono = taikoCurrent.PreviousMono(availableFingersFor(taikoCurrent) - 1);
double objectStrain = 0.5; // Add a base strain to all objects
- if (taikoPrevious == null) return objectStrain;
+ if (current.Previous(1) is not TaikoDifficultyHitObject taikoPrevious) return objectStrain;
if (previousMono != null)
objectStrain += speedBonus(taikoCurrent.StartTime - previousMono.StartTime) + 0.5 * speedBonus(taikoCurrent.StartTime - taikoPrevious.StartTime);
diff --git a/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/Colour/Data/MonoStreak.cs b/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/Colour/Data/MonoStreak.cs
index c01a0f66868c..014461c10b5c 100644
--- a/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/Colour/Data/MonoStreak.cs
+++ b/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/Colour/Data/MonoStreak.cs
@@ -1,9 +1,9 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
+using System.Collections.Generic;
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Taiko.Objects;
-using System.Collections.Generic;
namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour.Data
{
diff --git a/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/TaikoDifficultyHitObject.cs b/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/TaikoDifficultyHitObject.cs
index f407e13ff1d6..f9bb38688d6f 100644
--- a/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/TaikoDifficultyHitObject.cs
+++ b/osu.Game.Rulesets.Taiko/Difficulty/Preprocessing/TaikoDifficultyHitObject.cs
@@ -7,10 +7,10 @@
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Taiko.Difficulty.Evaluators;
-using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour;
using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Rhythm;
using osu.Game.Rulesets.Taiko.Difficulty.Utils;
+using osu.Game.Rulesets.Taiko.Objects;
namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing
{
diff --git a/osu.Game.Rulesets.Taiko/Edit/Checks/CheckTaikoAbnormalDifficultySettings.cs b/osu.Game.Rulesets.Taiko/Edit/Checks/CheckTaikoAbnormalDifficultySettings.cs
index edf4d29e3827..539c6eda6c6f 100644
--- a/osu.Game.Rulesets.Taiko/Edit/Checks/CheckTaikoAbnormalDifficultySettings.cs
+++ b/osu.Game.Rulesets.Taiko/Edit/Checks/CheckTaikoAbnormalDifficultySettings.cs
@@ -15,9 +15,8 @@ public class CheckTaikoAbnormalDifficultySettings : CheckAbnormalDifficultySetti
public override IEnumerable Run(BeatmapVerifierContext context)
{
var diff = context.CurrentDifficulty.Playable.Difficulty;
- Issue? issue;
- if (HasMoreThanOneDecimalPlace("Overall difficulty", diff.OverallDifficulty, out issue))
+ if (HasMoreThanOneDecimalPlace("Overall difficulty", diff.OverallDifficulty, out var issue))
yield return issue;
if (OutOfRange("Overall difficulty", diff.OverallDifficulty, out issue))
diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModConstantSpeed.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModConstantSpeed.cs
index e6fd5fc93e0d..e05ba4498fb9 100644
--- a/osu.Game.Rulesets.Taiko/Mods/TaikoModConstantSpeed.cs
+++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModConstantSpeed.cs
@@ -5,9 +5,9 @@
using osu.Framework.Localisation;
using osu.Game.Configuration;
using osu.Game.Graphics;
+using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Rulesets.Taiko.UI;
-using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Taiko.Mods
diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModDifficultyAdjust.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModDifficultyAdjust.cs
index 87d7aabf86c5..3c506e07da18 100644
--- a/osu.Game.Rulesets.Taiko/Mods/TaikoModDifficultyAdjust.cs
+++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModDifficultyAdjust.cs
@@ -34,7 +34,7 @@ public override string ExtendedIconInformation
return string.Empty;
- string format(string acronym, DifficultyBindable bindable, int digits)
+ static string format(string acronym, DifficultyBindable bindable, int digits)
=> $"{acronym}{bindable.Value!.Value.ToStandardFormattedString(digits)}";
}
}
diff --git a/osu.Game.Rulesets.Taiko/Mods/TaikoModSingleTap.cs b/osu.Game.Rulesets.Taiko/Mods/TaikoModSingleTap.cs
index 4b6a9780a3d7..6dc9f9d5ec88 100644
--- a/osu.Game.Rulesets.Taiko/Mods/TaikoModSingleTap.cs
+++ b/osu.Game.Rulesets.Taiko/Mods/TaikoModSingleTap.cs
@@ -1,7 +1,6 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Framework.Localisation;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -9,16 +8,17 @@
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
+using osu.Framework.Localisation;
using osu.Game.Beatmaps.Timing;
using osu.Game.Graphics;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Objects;
-using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Rulesets.Scoring;
+using osu.Game.Rulesets.Taiko.Objects;
+using osu.Game.Rulesets.Taiko.UI;
using osu.Game.Rulesets.UI;
using osu.Game.Screens.Play;
using osu.Game.Utils;
-using osu.Game.Rulesets.Taiko.UI;
namespace osu.Game.Rulesets.Taiko.Mods
{
diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableDrumRoll.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableDrumRoll.cs
index f4dc1f18bdfc..46259dadde53 100644
--- a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableDrumRoll.cs
+++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableDrumRoll.cs
@@ -6,19 +6,19 @@
using System;
using JetBrains.Annotations;
using osu.Framework.Allocation;
-using osu.Framework.Utils;
-using osu.Game.Graphics;
-using osu.Game.Rulesets.Objects.Drawables;
-using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Input.Events;
+using osu.Framework.Utils;
+using osu.Game.Graphics;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Taiko.Skinning.Default;
using osu.Game.Skinning;
using osuTK;
+using osuTK.Graphics;
namespace osu.Game.Rulesets.Taiko.Objects.Drawables
{
diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableSwell.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableSwell.cs
index 6ad14c87d1f6..5e122decdb20 100644
--- a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableSwell.cs
+++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableSwell.cs
@@ -8,9 +8,9 @@
using JetBrains.Annotations;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
-using osu.Game.Rulesets.Objects.Drawables;
using osu.Framework.Input.Events;
using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Taiko.Skinning.Default;
using osu.Game.Screens.Play;
using osu.Game.Skinning;
@@ -189,7 +189,7 @@ protected override void Update()
else
UnproxyContent();
- if ((Clock as IGameplayClock)?.IsRewinding == true)
+ if (Clock is IGameplayClock { IsRewinding: true })
lastPressHandleTime = null;
}
diff --git a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableTaikoHitObject.cs b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableTaikoHitObject.cs
index 520ac2ba8039..83148bb0505f 100644
--- a/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableTaikoHitObject.cs
+++ b/osu.Game.Rulesets.Taiko/Objects/Drawables/DrawableTaikoHitObject.cs
@@ -4,7 +4,6 @@
#nullable disable
using System.Collections.Generic;
-using System.Linq;
using JetBrains.Annotations;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@@ -120,7 +119,7 @@ private partial class ProxiedContentContainer : Container
}
// osu!taiko hitsounds are managed by the drum (see DrumSampleTriggerSource).
- public sealed override IEnumerable GetSamples() => Enumerable.Empty();
+ public sealed override IEnumerable GetSamples() => [];
}
public abstract partial class DrawableTaikoHitObject : DrawableTaikoHitObject
diff --git a/osu.Game.Rulesets.Taiko/Objects/Swell.cs b/osu.Game.Rulesets.Taiko/Objects/Swell.cs
index d9e8c77ea78a..9c5f3ab2603a 100644
--- a/osu.Game.Rulesets.Taiko/Objects/Swell.cs
+++ b/osu.Game.Rulesets.Taiko/Objects/Swell.cs
@@ -2,8 +2,8 @@
// See the LICENCE file in the repository root for full licence text.
using System.Threading;
-using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Judgements;
+using osu.Game.Rulesets.Objects.Types;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.Taiko.Judgements;
diff --git a/osu.Game.Rulesets.Taiko/Replays/TaikoAutoGenerator.cs b/osu.Game.Rulesets.Taiko/Replays/TaikoAutoGenerator.cs
index 11136ad695b3..4d30a77c02ee 100644
--- a/osu.Game.Rulesets.Taiko/Replays/TaikoAutoGenerator.cs
+++ b/osu.Game.Rulesets.Taiko/Replays/TaikoAutoGenerator.cs
@@ -5,10 +5,10 @@
using System.Linq;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Game.Beatmaps;
-using osu.Game.Rulesets.Taiko.Objects;
+using osu.Game.Rulesets.Objects;
using osu.Game.Rulesets.Replays;
using osu.Game.Rulesets.Taiko.Beatmaps;
-using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Taiko.Objects;
namespace osu.Game.Rulesets.Taiko.Replays
{
diff --git a/osu.Game.Rulesets.Taiko/Replays/TaikoFramedReplayInputHandler.cs b/osu.Game.Rulesets.Taiko/Replays/TaikoFramedReplayInputHandler.cs
index 2f9b6c7f6011..d579b784d6e5 100644
--- a/osu.Game.Rulesets.Taiko/Replays/TaikoFramedReplayInputHandler.cs
+++ b/osu.Game.Rulesets.Taiko/Replays/TaikoFramedReplayInputHandler.cs
@@ -1,11 +1,11 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Game.Rulesets.Replays;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Input.StateChanges;
using osu.Game.Replays;
+using osu.Game.Rulesets.Replays;
namespace osu.Game.Rulesets.Taiko.Replays
{
diff --git a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonDrumSampleTriggerSource.cs b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonDrumSampleTriggerSource.cs
index fb4c1067e31c..a6a99feffa4c 100644
--- a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonDrumSampleTriggerSource.cs
+++ b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonDrumSampleTriggerSource.cs
@@ -23,9 +23,7 @@ public ArgonDrumSampleTriggerSource(HitObjectContainer hitObjectContainer, Sampl
public override void Play(HitType hitType, bool strong)
{
- TaikoHitObject? hitObject = GetMostValidObject() as TaikoHitObject;
-
- if (hitObject == null)
+ if (GetMostValidObject() is not TaikoHitObject hitObject)
return;
var originalSample = hitObject.CreateHitSampleInfo(hitType == HitType.Rim ? HitSampleInfo.HIT_CLAP : HitSampleInfo.HIT_NORMAL);
diff --git a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonFlourishTriggerSource.cs b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonFlourishTriggerSource.cs
index 8dfe31b55d43..f86d87c8b502 100644
--- a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonFlourishTriggerSource.cs
+++ b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonFlourishTriggerSource.cs
@@ -31,9 +31,7 @@ public ArgonFlourishTriggerSource(HitObjectContainer hitObjectContainer)
public override void Play(HitType hitType, bool strong)
{
- TaikoHitObject? hitObject = GetMostValidObject() as TaikoHitObject;
-
- if (hitObject == null)
+ if (GetMostValidObject() is not TaikoHitObject hitObject)
return;
var originalSample = hitObject.CreateHitSampleInfo(hitType == HitType.Rim ? HitSampleInfo.HIT_CLAP : HitSampleInfo.HIT_NORMAL);
diff --git a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonHitExplosion.cs b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonHitExplosion.cs
index cddae7f05bb0..e2af3bf4df1c 100644
--- a/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonHitExplosion.cs
+++ b/osu.Game.Rulesets.Taiko/Skinning/Argon/ArgonHitExplosion.cs
@@ -53,7 +53,7 @@ public void Animate(DrawableHitObject drawableHitObject)
{
this.FadeOut();
- bool isRim = (drawableHitObject.HitObject as Hit)?.Type == HitType.Rim;
+ bool isRim = drawableHitObject.HitObject is Hit { Type: HitType.Rim };
outer.Colour = isRim ? ArgonInputDrum.RIM_HIT_GRADIENT : ArgonInputDrum.CENTRE_HIT_GRADIENT;
inner.EdgeEffect = new EdgeEffectParameters
diff --git a/osu.Game.Rulesets.Taiko/Skinning/Argon/TaikoArgonSkinTransformer.cs b/osu.Game.Rulesets.Taiko/Skinning/Argon/TaikoArgonSkinTransformer.cs
index 820af4ce54f8..0236168a878c 100644
--- a/osu.Game.Rulesets.Taiko/Skinning/Argon/TaikoArgonSkinTransformer.cs
+++ b/osu.Game.Rulesets.Taiko/Skinning/Argon/TaikoArgonSkinTransformer.cs
@@ -42,8 +42,7 @@ public TaikoArgonSkinTransformer(ISkin skin)
leaderboard.Height = 140;
}
- if (comboCounter != null)
- comboCounter.Position = new Vector2(36, -66);
+ comboCounter?.Position = new Vector2(36, -66);
if (spectatorList != null)
{
diff --git a/osu.Game.Rulesets.Taiko/Skinning/Default/CirclePiece.cs b/osu.Game.Rulesets.Taiko/Skinning/Default/CirclePiece.cs
index a7b1b9c4b63a..2c1c3f8d06f8 100644
--- a/osu.Game.Rulesets.Taiko/Skinning/Default/CirclePiece.cs
+++ b/osu.Game.Rulesets.Taiko/Skinning/Default/CirclePiece.cs
@@ -56,17 +56,15 @@ public Color4 AccentColour
}
}
- private bool kiaiMode;
-
///
/// Whether Kiai mode effects are enabled for this circle piece.
///
public bool KiaiMode
{
- get => kiaiMode;
+ get;
set
{
- kiaiMode = value;
+ field = value;
resetEdgeEffects();
}
diff --git a/osu.Game.Rulesets.Taiko/Skinning/Default/DefaultHitExplosion.cs b/osu.Game.Rulesets.Taiko/Skinning/Default/DefaultHitExplosion.cs
index 8a70c4bde88c..982bf27f6029 100644
--- a/osu.Game.Rulesets.Taiko/Skinning/Default/DefaultHitExplosion.cs
+++ b/osu.Game.Rulesets.Taiko/Skinning/Default/DefaultHitExplosion.cs
@@ -61,7 +61,7 @@ private void updateColour(DrawableHitObject? judgedObject = null)
if (body == null)
return;
- bool isRim = (judgedObject?.HitObject as Hit)?.Type == HitType.Rim;
+ bool isRim = judgedObject?.HitObject is Hit { Type: HitType.Rim };
body.Colour = isRim ? colours.BlueDarker : colours.PinkDarker;
}
diff --git a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyKiaiGlow.cs b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyKiaiGlow.cs
index 58830f749281..73de3e599806 100644
--- a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyKiaiGlow.cs
+++ b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyKiaiGlow.cs
@@ -41,8 +41,7 @@ protected override void LoadComplete()
{
base.LoadComplete();
- if (healthProcessor != null)
- healthProcessor.NewJudgement += onNewJudgement;
+ healthProcessor?.NewJudgement += onNewJudgement;
}
protected override void Update()
@@ -73,8 +72,7 @@ protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
- if (healthProcessor != null)
- healthProcessor.NewJudgement -= onNewJudgement;
+ healthProcessor?.NewJudgement -= onNewJudgement;
}
}
}
diff --git a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacySwell.cs b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacySwell.cs
index 9f1b69298493..3a93bda04f23 100644
--- a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacySwell.cs
+++ b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacySwell.cs
@@ -1,20 +1,20 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osu.Framework.Graphics;
+using System;
+using System.Globalization;
using osu.Framework.Allocation;
+using osu.Framework.Extensions.ObjectExtensions;
+using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
-using osu.Game.Skinning;
using osu.Framework.Graphics.Sprites;
-using osu.Game.Rulesets.Taiko.Objects.Drawables;
-using osu.Game.Rulesets.Taiko.Objects;
+using osu.Framework.Utils;
using osu.Game.Audio;
-using osuTK;
using osu.Game.Rulesets.Objects.Drawables;
-using osu.Framework.Extensions.ObjectExtensions;
-using System;
-using System.Globalization;
-using osu.Framework.Utils;
+using osu.Game.Rulesets.Taiko.Objects;
+using osu.Game.Rulesets.Taiko.Objects.Drawables;
+using osu.Game.Skinning;
+using osuTK;
namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
{
diff --git a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyTaikoScroller.cs b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyTaikoScroller.cs
index 2964473f8903..7069c1b585df 100644
--- a/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyTaikoScroller.cs
+++ b/osu.Game.Rulesets.Taiko/Skinning/Legacy/LegacyTaikoScroller.cs
@@ -92,22 +92,20 @@ private partial class ScrollerSprite : CompositeDrawable
private Sprite passingSprite = null!;
private Sprite failingSprite = null!;
- private bool passing = true;
-
public bool Passing
{
- get => passing;
+ get;
set
{
- if (value == passing)
+ if (value == field)
return;
- passing = value;
+ field = value;
if (IsLoaded)
updatePassing();
}
- }
+ } = true;
[BackgroundDependencyLoader]
private void load(ISkinSource skin)
@@ -136,7 +134,7 @@ protected override void Update()
private void updatePassing()
{
- if (passing)
+ if (Passing)
{
passingSprite.Show();
failingSprite.FadeOut(200);
diff --git a/osu.Game.Rulesets.Taiko/TaikoRuleset.cs b/osu.Game.Rulesets.Taiko/TaikoRuleset.cs
index 686d40ff37da..1b33781889c4 100644
--- a/osu.Game.Rulesets.Taiko/TaikoRuleset.cs
+++ b/osu.Game.Rulesets.Taiko/TaikoRuleset.cs
@@ -11,35 +11,35 @@
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Legacy;
+using osu.Game.Configuration;
using osu.Game.Graphics;
+using osu.Game.Localisation;
+using osu.Game.Overlays.Settings;
+using osu.Game.Rulesets.Configuration;
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Replays.Types;
using osu.Game.Rulesets.Scoring;
+using osu.Game.Rulesets.Scoring.Legacy;
using osu.Game.Rulesets.Taiko.Beatmaps;
+using osu.Game.Rulesets.Taiko.Configuration;
using osu.Game.Rulesets.Taiko.Difficulty;
using osu.Game.Rulesets.Taiko.Edit;
+using osu.Game.Rulesets.Taiko.Edit.Setup;
using osu.Game.Rulesets.Taiko.Mods;
using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Rulesets.Taiko.Replays;
using osu.Game.Rulesets.Taiko.Scoring;
using osu.Game.Rulesets.Taiko.Skinning.Argon;
+using osu.Game.Rulesets.Taiko.Skinning.Default;
using osu.Game.Rulesets.Taiko.Skinning.Legacy;
using osu.Game.Rulesets.Taiko.UI;
using osu.Game.Rulesets.UI;
-using osu.Game.Overlays.Settings;
using osu.Game.Scoring;
+using osu.Game.Screens.Edit.Setup;
using osu.Game.Screens.Ranking.Statistics;
using osu.Game.Skinning;
-using osu.Game.Rulesets.Configuration;
-using osu.Game.Configuration;
-using osu.Game.Localisation;
-using osu.Game.Rulesets.Scoring.Legacy;
-using osu.Game.Rulesets.Taiko.Configuration;
-using osu.Game.Rulesets.Taiko.Edit.Setup;
-using osu.Game.Rulesets.Taiko.Skinning.Default;
-using osu.Game.Screens.Edit.Setup;
using osu.Game.Utils;
namespace osu.Game.Rulesets.Taiko
@@ -184,7 +184,7 @@ public override IEnumerable GetModsFor(ModType type)
};
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/osu.Game.Rulesets.Taiko/UI/DrawableTaikoRuleset.cs b/osu.Game.Rulesets.Taiko/UI/DrawableTaikoRuleset.cs
index 4185b67f4c70..07cce2de3472 100644
--- a/osu.Game.Rulesets.Taiko/UI/DrawableTaikoRuleset.cs
+++ b/osu.Game.Rulesets.Taiko/UI/DrawableTaikoRuleset.cs
@@ -61,7 +61,7 @@ private void load([CanBeNull] GameplayState gameplayState)
var spriteElements = gameplayState?.Storyboard.Layers.Where(l => l.Name != @"Overlay")
.SelectMany(l => l.Elements)
.OfType()
- .DistinctBy(e => e.Path) ?? Enumerable.Empty();
+ .DistinctBy(e => e.Path) ?? [];
if (spriteElements.Count() < 10)
{
@@ -98,8 +98,7 @@ protected override void UpdateAfterChildren()
var playfieldScreen = Playfield.ScreenSpaceDrawQuad;
- if (scroller != null)
- scroller.Height = ToLocalSpace(playfieldScreen.TopLeft + new Vector2(0, playfieldScreen.Height / 20)).Y;
+ scroller?.Height = ToLocalSpace(playfieldScreen.TopLeft + new Vector2(0, playfieldScreen.Height / 20)).Y;
}
public MultiplierControlPoint ControlPointAt(double time)
diff --git a/osu.Game.Rulesets.Taiko/UI/DrumSamplePlayer.cs b/osu.Game.Rulesets.Taiko/UI/DrumSamplePlayer.cs
index 57067ac66656..b79fc83c839c 100644
--- a/osu.Game.Rulesets.Taiko/UI/DrumSamplePlayer.cs
+++ b/osu.Game.Rulesets.Taiko/UI/DrumSamplePlayer.cs
@@ -45,7 +45,7 @@ protected virtual DrumSampleTriggerSource CreateTriggerSource(HitObjectContainer
public bool OnPressed(KeyBindingPressEvent e)
{
- if ((Clock as IGameplayClock)?.IsRewinding == true)
+ if (Clock is IGameplayClock { IsRewinding: true })
return false;
HitType hitType;
diff --git a/osu.Game.Rulesets.Taiko/UI/DrumSampleTriggerSource.cs b/osu.Game.Rulesets.Taiko/UI/DrumSampleTriggerSource.cs
index 1de16c2294f9..9d15e1a7b163 100644
--- a/osu.Game.Rulesets.Taiko/UI/DrumSampleTriggerSource.cs
+++ b/osu.Game.Rulesets.Taiko/UI/DrumSampleTriggerSource.cs
@@ -35,9 +35,7 @@ public DrumSampleTriggerSource(HitObjectContainer hitObjectContainer, SampleBala
public virtual void Play(HitType hitType, bool strong)
{
- TaikoHitObject? hitObject = GetMostValidObject() as TaikoHitObject;
-
- if (hitObject == null)
+ if (GetMostValidObject() is not TaikoHitObject hitObject)
return;
var baseSample = hitObject.CreateHitSampleInfo(hitType == HitType.Rim ? HitSampleInfo.HIT_CLAP : HitSampleInfo.HIT_NORMAL);
diff --git a/osu.Game.Rulesets.Taiko/UI/DrumTouchInputArea.cs b/osu.Game.Rulesets.Taiko/UI/DrumTouchInputArea.cs
index 53d129e7ca6d..e114a02e65ee 100644
--- a/osu.Game.Rulesets.Taiko/UI/DrumTouchInputArea.cs
+++ b/osu.Game.Rulesets.Taiko/UI/DrumTouchInputArea.cs
@@ -213,17 +213,15 @@ protected override void PopOut()
private partial class DrumSegment : CompositeDrawable, IKeyBindingHandler
{
- private TaikoAction action;
-
public TaikoAction Action
{
- get => action;
+ get;
set
{
- if (action == value)
+ if (field == value)
return;
- action = value;
+ field = value;
updateColoursFromAction();
}
}
diff --git a/osu.Game.Rulesets.Taiko/UI/HitExplosion.cs b/osu.Game.Rulesets.Taiko/UI/HitExplosion.cs
index 1a2652acf999..a9820b14239a 100644
--- a/osu.Game.Rulesets.Taiko/UI/HitExplosion.cs
+++ b/osu.Game.Rulesets.Taiko/UI/HitExplosion.cs
@@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System;
-using osuTK;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Pooling;
@@ -12,6 +11,7 @@
using osu.Game.Rulesets.Taiko.Objects;
using osu.Game.Rulesets.Taiko.Skinning.Default;
using osu.Game.Skinning;
+using osuTK;
namespace osu.Game.Rulesets.Taiko.UI
{
diff --git a/osu.Game.Rulesets.Taiko/UI/TaikoHitTarget.cs b/osu.Game.Rulesets.Taiko/UI/TaikoHitTarget.cs
index a2f8dc83db30..f88cffa9d625 100644
--- a/osu.Game.Rulesets.Taiko/UI/TaikoHitTarget.cs
+++ b/osu.Game.Rulesets.Taiko/UI/TaikoHitTarget.cs
@@ -1,12 +1,12 @@
// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
-using osuTK;
-using osuTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Rulesets.Taiko.Objects;
+using osuTK;
+using osuTK.Graphics;
namespace osu.Game.Rulesets.Taiko.UI
{
diff --git a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs
index db61f27cb2e3..55d3407cb514 100644
--- a/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs
+++ b/osu.Game.Rulesets.Taiko/UI/TaikoPlayfield.cs
@@ -8,16 +8,16 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
-using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Objects;
+using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Scoring;
-using osu.Game.Rulesets.UI;
-using osu.Game.Rulesets.UI.Scrolling;
-using osu.Game.Rulesets.Taiko.Objects.Drawables;
using osu.Game.Rulesets.Taiko.Judgements;
using osu.Game.Rulesets.Taiko.Objects;
+using osu.Game.Rulesets.Taiko.Objects.Drawables;
using osu.Game.Rulesets.Taiko.Scoring;
+using osu.Game.Rulesets.UI;
+using osu.Game.Rulesets.UI.Scrolling;
using osu.Game.Skinning;
namespace osu.Game.Rulesets.Taiko.UI
diff --git a/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj b/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj
index cacba55c2af7..da4b0cbc7a8b 100644
--- a/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj
+++ b/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
bash the drum. to the beat.
diff --git a/osu.Game.Tests.Android/AndroidManifest.xml b/osu.Game.Tests.Android/AndroidManifest.xml
index 25869b6d567d..3dd9c29b821d 100644
--- a/osu.Game.Tests.Android/AndroidManifest.xml
+++ b/osu.Game.Tests.Android/AndroidManifest.xml
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/osu.Game.Tests.Android/osu.Game.Tests.Android.csproj b/osu.Game.Tests.Android/osu.Game.Tests.Android.csproj
index a8fc9536b912..fe55f652bfc5 100644
--- a/osu.Game.Tests.Android/osu.Game.Tests.Android.csproj
+++ b/osu.Game.Tests.Android/osu.Game.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Tests
osu.Game.Tests.Android
@@ -28,9 +28,9 @@
-
+
-
+
-
+
NU1903
-
-
+
@@ -43,15 +42,9 @@
-
+
-
-
-
-
-
-
diff --git a/osu.iOS.props b/osu.iOS.props
index c6a4c07fef57..12c5c45bb07b 100644
--- a/osu.iOS.props
+++ b/osu.iOS.props
@@ -5,16 +5,28 @@
- $(NoWarn);MT7091
+ $(NoWarn);MT7091;CS8767;IL2026;IL2067
+
+ false
true
+
+ None
+
+ true
false
-all
+
+ true
diff --git a/osu.iOS/AppDelegate.cs b/osu.iOS/AppDelegate.cs
index 65c1951e801a..5d83fced1879 100644
--- a/osu.iOS/AppDelegate.cs
+++ b/osu.iOS/AppDelegate.cs
@@ -17,7 +17,18 @@ public class AppDelegate : GameApplicationDelegate, IUIApplicationDelegate
///
/// The current orientation the game is displayed in.
///
- public UIInterfaceOrientation CurrentOrientation => Host.Window.UIWindow.WindowScene!.InterfaceOrientation;
+ public UIInterfaceOrientation CurrentOrientation
+ {
+ get
+ {
+#pragma warning disable CA1422 // Validate platform compatibility
+ if (!OperatingSystem.IsIOSVersionAtLeast(26))
+ return Host.Window.UIWindow.WindowScene!.InterfaceOrientation;
+#pragma warning restore CA1422
+
+ return Host.Window.UIWindow.WindowScene!.EffectiveGeometry.InterfaceOrientation;
+ }
+ }
///
/// Controls the orientations allowed for the device to rotate to, overriding the default allowed orientations.
@@ -41,7 +52,7 @@ public UIInterfaceOrientationMask? Orientations
protected override Framework.Game CreateGame() => new OsuGameIOS(this);
- public UIInterfaceOrientationMask GetSupportedInterfaceOrientations(UIApplication application, UIWindow forWindow)
+ public UIInterfaceOrientationMask GetSupportedInterfaceOrientations(UIApplication application, UIWindow? forWindow)
{
if (orientations != null)
return orientations.Value;
diff --git a/osu.iOS/osu.iOS.csproj b/osu.iOS/osu.iOS.csproj
index 04c00b4c3597..3d897f0ef0f7 100644
--- a/osu.iOS/osu.iOS.csproj
+++ b/osu.iOS/osu.iOS.csproj
@@ -1,6 +1,6 @@
- net8.0-ios
+ net10.0-ios
13.4
Exe
0.1.0
@@ -20,7 +20,7 @@
-
+