diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index b322919..f9d5307 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -4,7 +4,7 @@ on: ["push", "pull_request"]
jobs:
build:
- runs-on: ubuntu-20.04
+ runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
@@ -23,7 +23,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
- dotnet-version: 6.x
+ dotnet-version: 8.0.x
- name: Run the Cake script
uses: cake-build/cake-action@v1
diff --git a/Directory.Build.props b/Directory.Build.props
index 9d7d94f..f57b465 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -16,6 +16,11 @@
git
https://github.com/NuclearPowered/Reactor
LGPL-3.0-or-later
+
+
+ true
+ false
+ true
diff --git a/Reactor.Benchmarks/AssetBundleBenchmarks.cs b/Reactor.Benchmarks/AssetBundleBenchmarks.cs
index 9e092c7..8c20bd9 100644
--- a/Reactor.Benchmarks/AssetBundleBenchmarks.cs
+++ b/Reactor.Benchmarks/AssetBundleBenchmarks.cs
@@ -41,7 +41,7 @@ public class AssetBundleBenchmarks
private AssetBundle LoadAll(AssetBundle assetBundle)
{
- if (assetBundle == null) throw new ArgumentNullException(nameof(assetBundle));
+ ArgumentNullException.ThrowIfNull(assetBundle);
assetBundle.LoadAllAssets();
return assetBundle;
diff --git a/Reactor.Networking.Shared/Mod.cs b/Reactor.Networking.Shared/Mod.cs
index f540a02..5b99575 100644
--- a/Reactor.Networking.Shared/Mod.cs
+++ b/Reactor.Networking.Shared/Mod.cs
@@ -94,18 +94,18 @@ public readonly struct Mod : IEquatable
var clientMissing = hostMods.Where(mod => mod.IsRequiredOnAllClients && !clientMods.Contains(mod)).ToArray();
var hostMissing = clientMods.Where(mod => mod.IsRequiredOnAllClients && !hostMods.Contains(mod)).ToArray();
- if (clientMissing.Any() || hostMissing.Any())
+ if (clientMissing.Length != 0 || hostMissing.Length != 0)
{
var message = new StringBuilder();
- if (clientMissing.Any())
+ if (clientMissing.Length != 0)
{
message.Append("You are missing: ");
message.AppendJoin(", ", clientMissing.Select(x => x.ToString()));
message.AppendLine();
}
- if (hostMissing.Any())
+ if (hostMissing.Length != 0)
{
message.Append("Host is missing: ");
message.AppendJoin(", ", hostMissing.Select(x => x.ToString()));
diff --git a/Reactor/Networking/Rpc/UnsafeCustomRpc.cs b/Reactor/Networking/Rpc/UnsafeCustomRpc.cs
index e04af54..80e390d 100644
--- a/Reactor/Networking/Rpc/UnsafeCustomRpc.cs
+++ b/Reactor/Networking/Rpc/UnsafeCustomRpc.cs
@@ -96,7 +96,7 @@ public abstract class UnsafeCustomRpc
/// The callback to invoke when this packet is acknowledged.
public void UnsafeSend(InnerNetObject innerNetObject, object? data, bool immediately = false, int targetClientId = -1, Action? ackCallback = null)
{
- if (innerNetObject == null) throw new ArgumentNullException(nameof(innerNetObject));
+ ArgumentNullException.ThrowIfNull(innerNetObject);
if (Manager == null)
{
diff --git a/Reactor/Reactor.csproj b/Reactor/Reactor.csproj
index f532132..7e09fec 100644
--- a/Reactor/Reactor.csproj
+++ b/Reactor/Reactor.csproj
@@ -6,15 +6,9 @@
true
true
-
-
- true
- false
- true
-
diff --git a/Reactor/ReactorPlugin.cs b/Reactor/ReactorPlugin.cs
index a69c3b9..6b3dd4e 100644
--- a/Reactor/ReactorPlugin.cs
+++ b/Reactor/ReactorPlugin.cs
@@ -1,6 +1,5 @@
global using static Reactor.Utilities.Logger;
using System;
-using System.Linq;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Unity.IL2CPP;
@@ -111,7 +110,7 @@ public partial class ReactorPlugin : BasePlugin
foreach (var pluginInfo in IL2CPPChainloader.Instance.Plugins.Values)
{
var config = ((BasePlugin) pluginInfo.Instance).Config;
- if (!config.Any())
+ if (config.Count == 0)
{
continue;
}
diff --git a/Reactor/packages.lock.json b/Reactor/packages.lock.json
index aed78df..2133d50 100644
--- a/Reactor/packages.lock.json
+++ b/Reactor/packages.lock.json
@@ -37,16 +37,6 @@
"Samboy063.Cpp2IL.Core": "2022.1.0-development.866"
}
},
- "Microsoft.SourceLink.GitHub": {
- "type": "Direct",
- "requested": "[1.1.1, )",
- "resolved": "1.1.1",
- "contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
- "dependencies": {
- "Microsoft.Build.Tasks.Git": "1.1.1",
- "Microsoft.SourceLink.Common": "1.1.1"
- }
- },
"StyleCop.Analyzers": {
"type": "Direct",
"requested": "[1.2.0-beta.435, )",
@@ -171,11 +161,6 @@
"resolved": "2.1.0",
"contentHash": "YYpq7NM50bSSVUDjXyV/eiITk6syXqItPjKBOb3jEWS6RFsk0DNhpWMPW6b3hKDmArARuWDU6S2pVu1IeVrvIA=="
},
- "Microsoft.Build.Tasks.Git": {
- "type": "Transitive",
- "resolved": "1.1.1",
- "contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q=="
- },
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Transitive",
"resolved": "6.0.1",
@@ -191,11 +176,6 @@
"resolved": "1.1.0",
"contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg=="
},
- "Microsoft.SourceLink.Common": {
- "type": "Transitive",
- "resolved": "1.1.1",
- "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
- },
"Mono.Cecil": {
"type": "Transitive",
"resolved": "0.11.4",
diff --git a/global.json b/global.json
new file mode 100644
index 0000000..3fea262
--- /dev/null
+++ b/global.json
@@ -0,0 +1,6 @@
+{
+ "sdk": {
+ "version": "8.0.0",
+ "rollForward": "latestFeature"
+ }
+}