Refactor:
+Fix:
diff --git a/UnitystationLauncher/Constants/ApiUrls.cs b/UnitystationLauncher/Constants/ApiUrls.cs index 6cd3fb5..606e2df 100644 --- a/UnitystationLauncher/Constants/ApiUrls.cs +++ b/UnitystationLauncher/Constants/ApiUrls.cs @@ -3,7 +3,8 @@ namespace UnitystationLauncher.Constants; public static class ApiUrls { private static string ApiBaseUrl => "https://api.unitystation.org"; - public static string ServerListUrl => $"{ApiBaseUrl}/serverlist"; + private static string CentralCommandBaseUrl => "https://prod-api.unitystation.org"; + public static string ServerListUrl => $"{CentralCommandBaseUrl}/baby-serverlist/servers"; public static string ValidateUrl => $"{ApiBaseUrl}/validatehubclient"; public static string ValidateTokenUrl => $"{ApiBaseUrl}/validatetoken?data="; public static string SignOutUrl => $"{ApiBaseUrl}/signout?data="; diff --git a/UnitystationLauncher/Constants/AppInfo.cs b/UnitystationLauncher/Constants/AppInfo.cs index f2bafd0..a6f9048 100644 --- a/UnitystationLauncher/Constants/AppInfo.cs +++ b/UnitystationLauncher/Constants/AppInfo.cs @@ -4,5 +4,5 @@ public static class AppInfo { // Whenever you change the currentBuild here, please also update the one in // UnitystationLauncher/Assets/org.unitystation.StationHub.metainfo.xml - public const int CurrentBuild = 938; + public const int CurrentBuild = 939; } \ No newline at end of file diff --git a/UnitystationLauncher/ContentScanning/Resolver.cs b/UnitystationLauncher/ContentScanning/Resolver.cs index ec682ca..23f774b 100644 --- a/UnitystationLauncher/ContentScanning/Resolver.cs +++ b/UnitystationLauncher/ContentScanning/Resolver.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.IO; -using System.Reflection; +using System.Reflection.Metadata; using System.Reflection.PortableExecutable; using ILVerify; using Serilog; @@ -28,7 +28,7 @@ public void Dispose() } } - PEReader IResolver.ResolveAssembly(AssemblyName assemblyName) + public PEReader ResolveAssembly(AssemblyNameInfo assemblyName) { if (assemblyName.Name == null) { @@ -47,7 +47,7 @@ PEReader IResolver.ResolveAssembly(AssemblyName assemblyName) string fileName = Path.GetFileNameWithoutExtension(file.Name); if (string.Equals(fileName, assemblyName.Name, StringComparison.OrdinalIgnoreCase)) { - Log.Information($"Found DLL for assembly '{assemblyName.Name}': {file.FullName}"); + Log.Information("Found DLL for assembly \'{AssemblyNameName}\': {FileFullName}", assemblyName.Name, file.FullName); _dictionaryLookup[assemblyName.Name] = new(file.Open(FileMode.Open, FileAccess.Read, FileShare.Read)); return _dictionaryLookup[assemblyName.Name]; @@ -61,7 +61,7 @@ PEReader IResolver.ResolveAssembly(AssemblyName assemblyName) string fileName = Path.GetFileNameWithoutExtension(file.Name); if (string.Equals(fileName, assemblyName.Name, StringComparison.OrdinalIgnoreCase)) { - Log.Information($"Found DLL for assembly '{assemblyName.Name}': {file.FullName}"); + Log.Information("Found DLL for assembly \'{AssemblyNameName}\': {FileFullName}", assemblyName.Name, file.FullName); _dictionaryLookup[assemblyName.Name] = new(file.Open(FileMode.Open, FileAccess.Read, FileShare.Read)); return _dictionaryLookup[assemblyName.Name]; @@ -75,7 +75,7 @@ PEReader IResolver.ResolveAssembly(AssemblyName assemblyName) string fileName = Path.GetFileNameWithoutExtension(file.Name); if (string.Equals(fileName, assemblyName.Name, StringComparison.OrdinalIgnoreCase)) { - Log.Information($"Found DLL for assembly '{assemblyName.Name}': {file.FullName}"); + Log.Information("Found DLL for assembly \'{AssemblyNameName}\': {FileFullName}", assemblyName.Name, file.FullName); _dictionaryLookup[assemblyName.Name] = new(file.Open(FileMode.Open, FileAccess.Read, FileShare.Read)); return _dictionaryLookup[assemblyName.Name]; @@ -85,10 +85,12 @@ PEReader IResolver.ResolveAssembly(AssemblyName assemblyName) throw new FileNotFoundException("Unable to find it " + assemblyName.FullName); } - PEReader IResolver.ResolveModule(AssemblyName referencingAssembly, string fileName) + public PEReader ResolveModule(AssemblyNameInfo referencingAssembly, string fileName) { //TODO idk This is never used anywhere throw new NotImplementedException( $"idk How IResolver.ResolveModule(AssemblyName {referencingAssembly}, string {fileName}) , And it's never been called so.. "); } + + } \ No newline at end of file diff --git a/UnitystationLauncher/UnitystationLauncher.csproj b/UnitystationLauncher/UnitystationLauncher.csproj index 7128117..2b2a1f5 100644 --- a/UnitystationLauncher/UnitystationLauncher.csproj +++ b/UnitystationLauncher/UnitystationLauncher.csproj @@ -65,25 +65,25 @@