diff --git a/src/StarBreaker.DataCore.TypeGenerator/DataCoreCodeGenerator.cs b/src/StarBreaker.DataCore.TypeGenerator/DataCoreCodeGenerator.cs
index 94de039..b74d8d1 100644
--- a/src/StarBreaker.DataCore.TypeGenerator/DataCoreCodeGenerator.cs
+++ b/src/StarBreaker.DataCore.TypeGenerator/DataCoreCodeGenerator.cs
@@ -76,11 +76,6 @@ private void GenerateEnums(string path)
sb.AppendLine($"public enum {enumDefinition.GetName(Database)} : int");
sb.AppendLine("{");
- if ("SinglePlayerOrMultiplayer" == enumDefinition.GetName(Database))
- {
- Console.WriteLine();
- }
-
sb.AppendLine($" __Unknown = -1,");
for (var i = 0; i < enumDefinition.ValueCount; i++)
@@ -174,7 +169,7 @@ private void GenerateTypes(string path)
// DataType.WeakPointer => Database.StructDefinitions[property.StructIndex].GetName(Database)?,
_ => throw new ArgumentOutOfRangeException()
};
-
+
private string GetGenericPropertyType(DataCorePropertyDefinition property) => property.DataType switch
{
DataType.Boolean => "bool",
@@ -387,7 +382,7 @@ private void WriteArrayRead(StringBuilder sb, DataCorePropertyDefinition propert
throw new ArgumentOutOfRangeException();
}
}
-
+
private void GenerateConstantsFile(string path)
{
var sb = new StringBuilder();
@@ -400,7 +395,7 @@ private void GenerateConstantsFile(string path)
sb.AppendLine($" public const int StructsHash = {Database.StructsHash};");
sb.AppendLine($" public const int EnumsHash = {Database.EnumsHash};");
sb.AppendLine("}");
-
+
File.WriteAllText(Path.Combine(path, "Constants.cs"), sb.ToString());
}
}
\ No newline at end of file
diff --git a/src/StarBreaker.Dds/StarBreaker.Dds.csproj b/src/StarBreaker.Dds/StarBreaker.Dds.csproj
index d186a3a..d841f12 100644
--- a/src/StarBreaker.Dds/StarBreaker.Dds.csproj
+++ b/src/StarBreaker.Dds/StarBreaker.Dds.csproj
@@ -1,12 +1,11 @@
-
- true
-
-
-
-
-
-
-
-
-
+
+ true
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/StarBreaker/App.axaml.cs b/src/StarBreaker/App.axaml.cs
index 561f10f..ec6c601 100644
--- a/src/StarBreaker/App.axaml.cs
+++ b/src/StarBreaker/App.axaml.cs
@@ -1,3 +1,4 @@
+using System.Diagnostics.CodeAnalysis;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.ApplicationLifetimes;
@@ -24,17 +25,19 @@ public override void Initialize()
RequestedThemeVariant = ThemeVariant.Dark;
}
}
-
+
private SplashWindow? _splashWindow;
private MainWindow? _mainWindow;
+ [UnconditionalSuppressMessage(
+ "AssemblyLoadTrimming",
+ "IL2026:RequiresUnreferencedCode",
+ Justification = "Everything referenced in the loaded assembly is manually preserved, so it's safe")]
public override void OnFrameworkInitializationCompleted()
{
// Line below is needed to remove Avalonia data validation.
// Without this line you will get duplicate validations from both Avalonia and CT
-#pragma warning disable IL2026
BindingPlugins.DataValidators.RemoveAt(0);
-#pragma warning restore IL2026
var collection = new ServiceCollection();
@@ -59,12 +62,12 @@ public override void OnFrameworkInitializationCompleted()
private void SwapWindows(object? sender, EventArgs e)
{
- if (ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop)
+ if (ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop)
return;
-
+
var mainVm = Services.GetRequiredService();
_mainWindow = new MainWindow { DataContext = mainVm };
-
+
//do not change the order of these
_mainWindow.Show();
_splashWindow!.Close();
diff --git a/src/StarBreaker/StarBreaker.csproj b/src/StarBreaker/StarBreaker.csproj
index a00dac9..84eb90b 100644
--- a/src/StarBreaker/StarBreaker.csproj
+++ b/src/StarBreaker/StarBreaker.csproj
@@ -7,7 +7,7 @@
-
+
@@ -16,8 +16,11 @@
-
-
+
+
@@ -28,13 +31,12 @@
-
-
-
-
-
+
+
+
+
-
+
\ No newline at end of file