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.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index b55104c0..161e92b4 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -300,6 +300,21 @@ namespace StardewModdingAPI
return new PlatformAssemblyMap(targetPlatform, removeAssemblyReferences.ToArray(), targetAssemblies.ToArray());
}
+ /// <summary>Get whether the game assembly was patched by Stardew64Installer.</summary>
+ /// <param name="version">The version of Stardew64Installer which was applied to the game assembly, if any.</param>
+ internal static bool IsPatchedByStardew64Installer(out ISemanticVersion version)
+ {
+ PropertyInfo property = typeof(Game1).GetProperty("Stardew64InstallerVersion");
+ if (property == null)
+ {
+ version = null;
+ return false;
+ }
+
+ version = new SemanticVersion((string)property.GetValue(null));
+ return true;
+ }
+
/*********
** Private methods