remove obsolete validation

Players can no longer launch SMAPI from the installer folder, since the files are hidden in a data file.
This commit is contained in:
Jesse Plamondon-Willard 2019-11-04 12:02:29 -05:00
parent df7e814286
commit e454de1e11
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
1 changed files with 1 additions and 10 deletions

View File

@ -80,16 +80,7 @@ namespace StardewModdingAPI
Platform platform = EnvironmentUtility.DetectPlatform();
string gameAssemblyName = platform == Platform.Windows ? "Stardew Valley" : "StardewValley";
if (Type.GetType($"StardewValley.Game1, {gameAssemblyName}", throwOnError: false) == null)
{
Program.PrintErrorAndExit(
"Oops! SMAPI can't find the game. "
+ (Assembly.GetCallingAssembly().Location.Contains(Path.Combine("internal", "Windows")) || Assembly.GetCallingAssembly().Location.Contains(Path.Combine("internal", "Mono"))
? "It looks like you're running SMAPI from the download package, but you need to run the installed version instead. "
: "Make sure you're running StardewModdingAPI.exe in your game folder. "
)
+ "See the readme.txt file for details."
);
}
Program.PrintErrorAndExit("Oops! SMAPI can't find the game. Make sure you're running StardewModdingAPI.exe in your game folder. See the readme.txt file for details.");
}
/// <summary>Assert that the game version is within <see cref="Constants.MinimumGameVersion"/> and <see cref="Constants.MaximumGameVersion"/>.</summary>