Skip to content

Commit

Permalink
Get HAC version if installed
Browse files Browse the repository at this point in the history
  • Loading branch information
ocdtrekkie committed Jul 10, 2024
1 parent 6f5fd16 commit 45303d9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 45303d9

Please sign in to comment.