summaryrefslogtreecommitdiff
path: root/src/SMAPI/Constants.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Constants.cs')
-rw-r--r--src/SMAPI/Constants.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index 5de28f84..c86acd0a 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -340,5 +340,16 @@ namespace StardewModdingAPI
// if save doesn't exist yet, return the default one we expect to be created
return folder;
}
+
+ /// <summary>Get a display label for the game's build number.</summary>
+ internal static string GetBuildVersionLabel()
+ {
+ string version = typeof(Game1).Assembly.GetName().Version?.ToString() ?? "unknown";
+
+ if (version.StartsWith($"{Game1.version}."))
+ version = version.Substring(Game1.version.Length + 1);
+
+ return version;
+ }
}
}