diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..001ffee
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,30 @@
+name: CI
+
+on: ["push", "pull_request"]
+
+jobs:
+ build:
+ runs-on: ubuntu-20.04
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 6.x
+
+ - name: Build
+ run: build.sh
+
+ - uses: actions/upload-artifact@v2
+ with:
+ name: Mini.RegionInstall.dll
+ path: output/Mini.RegionInstall.dll
+
+ - uses: actions/upload-artifact@v2
+ with:
+ name: Mini.RegionInstall-NoReactor.dll
+ path: output/Mini.RegionInstall-NoReactor.dll
diff --git a/Mini.RegionInstall/Mini.RegionInstall.csproj b/Mini.RegionInstall/Mini.RegionInstall.csproj
index 14cd5ed..9087095 100644
--- a/Mini.RegionInstall/Mini.RegionInstall.csproj
+++ b/Mini.RegionInstall/Mini.RegionInstall.csproj
@@ -13,7 +13,7 @@
Steam
- 2021.11.9
+ 2021.12.14
diff --git a/Mini.RegionInstall/RegionInfoConverter.cs b/Mini.RegionInstall/RegionInfoConverter.cs
index 58cea0a..5070cd5 100644
--- a/Mini.RegionInstall/RegionInfoConverter.cs
+++ b/Mini.RegionInstall/RegionInfoConverter.cs
@@ -41,12 +41,13 @@ internal class RegionInfoConverter : JsonConverter
Dictionary stringValues = new Dictionary();
Dictionary intValues = new Dictionary();
+ Dictionary boolValues = new Dictionary();
while (reader.Read())
{
if (reader.TokenType == JsonTokenType.EndObject)
{
- return Assemble(stringValues, intValues);
+ return Assemble(stringValues, intValues, boolValues);
}
else if (reader.TokenType == JsonTokenType.PropertyName)
{
@@ -58,6 +59,11 @@ internal class RegionInfoConverter : JsonConverter
ushort val = reader.GetUInt16();
intValues.Add(propName, val);
}
+ else if (propName == "UseDtls")
+ {
+ bool val = reader.GetBoolean();
+ boolValues.Add(propName, val);
+ }
else if (propName != null)
{
string? val = reader.GetString();
@@ -82,7 +88,7 @@ public override void Write(Utf8JsonWriter writer, IRegionInfo value, JsonSeriali
throw new NotImplementedException();
}
- private static IRegionInfo? Assemble(Dictionary stringValues, Dictionary intValues)
+ private static IRegionInfo? Assemble(Dictionary stringValues, Dictionary intValues, Dictionary boolValues)
{
if (!stringValues.TryGetValue("$type", out string type))
{
@@ -97,10 +103,11 @@ public override void Write(Utf8JsonWriter writer, IRegionInfo value, JsonSeriali
stringValues.TryGetValue("Name", out string? name);
intValues.TryGetValue("Port", out ushort port);
intValues.TryGetValue("TranslateName", out ushort translateName);
+ boolValues.TryGetValue("UseDtls", out bool useDtls); // Defaults to false
// HACK: Unhollower is unable to deal with inheritance properly, so you need special code to deal with it.
// Simplify when https://github.com/knah/Il2CppAssemblyUnhollower/issues/33 is resolved.
- return new DnsRegionInfo(fqdn, name, (StringNames)translateName, defaultIp, port).Duplicate();
+ return new DnsRegionInfo(fqdn, name, (StringNames)translateName, defaultIp, port, useDtls).Duplicate();
case "StaticRegionInfo, Assembly-CSharp":
// TODO implement
@@ -112,7 +119,7 @@ public override void Write(Utf8JsonWriter writer, IRegionInfo value, JsonSeriali
private static IRegionInfo? AddLocalhost()
{
- return new DnsRegionInfo("localhost", "Localhost", StringNames.NoTranslation, "127.0.0.1", 22023).Cast();
+ return new DnsRegionInfo("localhost", "Localhost", StringNames.NoTranslation, "127.0.0.1", 22023, false).Cast();
}
}
}
diff --git a/nuget.config b/nuget.config
new file mode 100644
index 0000000..a10820c
--- /dev/null
+++ b/nuget.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+