summaryrefslogtreecommitdiff
path: root/src/SMAPI.Common/EnvironmentUtility.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Common/EnvironmentUtility.cs')
-rw-r--r--src/SMAPI.Common/EnvironmentUtility.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/SMAPI.Common/EnvironmentUtility.cs b/src/SMAPI.Common/EnvironmentUtility.cs
index b8a6d775..9d9e91e6 100644
--- a/src/SMAPI.Common/EnvironmentUtility.cs
+++ b/src/SMAPI.Common/EnvironmentUtility.cs
@@ -61,6 +61,21 @@ namespace StardewModdingAPI.Common
return (platform == Platform.Mac ? "MacOS " : "") + Environment.OSVersion;
}
+ /// <summary>Get the name of the Stardew Valley executable.</summary>
+ /// <param name="platform">The current platform.</param>
+ public static string GetExecutableName(Platform platform)
+ {
+ return platform == Platform.Windows
+ ? "Stardew Valley.exe"
+ : "StardewValley.exe";
+ }
+
+ /// <summary>Get whether the platform uses Mono.</summary>
+ /// <param name="platform">The current platform.</param>
+ public static bool IsMono(this Platform platform)
+ {
+ return platform == Platform.Linux || platform == Platform.Mac;
+ }
/*********
** Private methods