diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-11-14 22:23:51 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2016-11-14 22:23:51 -0500 |
commit | f54b4647921b04ce88b45bf90a33ae12e38fb77e (patch) | |
tree | 9875a413e827fd69a9c295ad1f355727d4cd7958 /src | |
parent | aafdcaa2c5eed8201b3a0f735891ba03446ec70e (diff) | |
download | SMAPI-f54b4647921b04ce88b45bf90a33ae12e38fb77e.tar.gz SMAPI-f54b4647921b04ce88b45bf90a33ae12e38fb77e.tar.bz2 SMAPI-f54b4647921b04ce88b45bf90a33ae12e38fb77e.zip |
minor cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 47f4e334..ae61bc4d 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -286,7 +286,7 @@ namespace StardewModdingAPI string errorPrefix = $"Couldn't load mod for manifest '{manifestPath}'"; // read manifest - Manifest manifest = new Manifest(); + Manifest manifest; try { // read manifest text @@ -342,17 +342,16 @@ namespace StardewModdingAPI } // load DLL & hook up mod - string targDll = string.Empty; try { - targDll = Path.Combine(directory, manifest.EntryDll); - if (!File.Exists(targDll)) + string assemblyPath = Path.Combine(directory, manifest.EntryDll); + if (!File.Exists(assemblyPath)) { - Program.Monitor.Log($"{errorPrefix}: target DLL '{targDll}' does not exist.", LogLevel.Error); + Program.Monitor.Log($"{errorPrefix}: target DLL '{assemblyPath}' does not exist.", LogLevel.Error); continue; } - Assembly modAssembly = Assembly.UnsafeLoadFrom(targDll); + Assembly modAssembly = Assembly.UnsafeLoadFrom(assemblyPath); if (modAssembly.DefinedTypes.Count(x => x.BaseType == typeof(Mod)) > 0) { TypeInfo modEntryType = modAssembly.DefinedTypes.First(x => x.BaseType == typeof(Mod)); |