From b632ae0fefd6be2228e73261e0ec7559e8559c36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Schm=C3=B6cker?= Date: Wed, 17 Jul 2024 16:03:16 +0200 Subject: [PATCH] feat: added GameVersions to the API --- CHANGELOG.md | 1 + JotunnLib/Utils/GameVersions.cs | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28e7cf1e8..715fde5fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Version 2.21.0 +* Added GameVersions utility to check for specific game versions * Added ConfigManagerUtils for soft access to common ConfigurationManager functionality * Added PieceManager.AddPieceCategory(string name) and PieceManager.RemovePieceCategory(string name) * Deprecated PieceManager.AddPieceCategory(string table, string name) and PieceManager.RemovePieceCategory(string table, string name), use the new overloads without the table parameter diff --git a/JotunnLib/Utils/GameVersions.cs b/JotunnLib/Utils/GameVersions.cs index b883ad2d2..cd5a36419 100644 --- a/JotunnLib/Utils/GameVersions.cs +++ b/JotunnLib/Utils/GameVersions.cs @@ -5,10 +5,19 @@ namespace Jotunn.Utils { - internal static class GameVersions + /// + /// Utility class for getting game versions + /// + public static class GameVersions { + /// + /// The semantic version of the running Valheim game + /// public static System.Version ValheimVersion { get; } = GetValheimVersion(); + /// + /// The network version of the running Valheim game, determining compatibility with other clients + /// public static uint NetworkVersion { get; } = GetNetworkVersion(); private static System.Version GetValheimVersion()