Skip to content

Commit

Permalink
feat: added GameVersions to the API
Browse files Browse the repository at this point in the history
  • Loading branch information
MSchmoecker committed Jul 17, 2024
1 parent 7b36835 commit 91c2183
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
11 changes: 10 additions & 1 deletion JotunnLib/Utils/GameVersions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,19 @@

namespace Jotunn.Utils
{
internal static class GameVersions
/// <summary>
/// Utility class for getting game versions
/// </summary>
public static class GameVersions
{
/// <summary>
/// The semantic version of the running Valheim game
/// </summary>
public static System.Version ValheimVersion { get; } = GetValheimVersion();

/// <summary>
/// The network version of the running Valheim game, determining compatibility with other clients
/// </summary>
public static uint NetworkVersion { get; } = GetNetworkVersion();

private static System.Version GetValheimVersion()
Expand Down

0 comments on commit 91c2183

Please sign in to comment.