From 45303d9fc40f6181fe96d42c434402f161996ff6 Mon Sep 17 00:00:00 2001 From: Jacob Weisz Date: Tue, 9 Jul 2024 22:02:09 -0500 Subject: [PATCH] Get HAC version if installed --- modSystem.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modSystem.cs b/modSystem.cs index c5adc46..9f05195 100644 --- a/modSystem.cs +++ b/modSystem.cs @@ -162,6 +162,13 @@ public static string GetSystemDetails() } } + if (File.Exists(@"C:\HAC\HAController.exe")) + { + ConfigObj = new modDatabase.Config { Key = "HAController_Version", Value = FileVersionInfo.GetVersionInfo(@"C:\HAC\HAController.exe").FileVersion }; + modDatabase.AddOrUpdateConfig(ConfigObj); + SystemDetailsJSON = SystemDetailsJSON + JsonSerializer.Serialize(ConfigObj) + ","; + } + SystemDetailsJSON = SystemDetailsJSON.Substring(0, SystemDetailsJSON.Length - 1) + "]}"; modSync.SendMessage("server", "nodedata", "systemdetails", SystemDetailsJSON);