summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-02-23 23:51:52 -0500
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-02-23 23:51:52 -0500
commit12cb2d272d54a850d3912e5fb39089c70cae5a9e (patch)
tree2c0312f151a5ea5cd68278b822664d9d3bca18ae /src/StardewModdingAPI
parent9bbd0a44593e65f9e05b9c1161347173d43ff395 (diff)
downloadSMAPI-12cb2d272d54a850d3912e5fb39089c70cae5a9e.tar.gz
SMAPI-12cb2d272d54a850d3912e5fb39089c70cae5a9e.tar.bz2
SMAPI-12cb2d272d54a850d3912e5fb39089c70cae5a9e.zip
minor cleanup
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r--src/StardewModdingAPI/Program.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs
index 8a6392ad..0394362e 100644
--- a/src/StardewModdingAPI/Program.cs
+++ b/src/StardewModdingAPI/Program.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.IO;
using System.Linq;
@@ -388,7 +389,7 @@ namespace StardewModdingAPI
this.Monitor.Log($"{skippedPrefix} because manifest parsing failed.\n{ex.GetLogSummary()}", LogLevel.Error);
continue;
}
- if(!string.IsNullOrWhiteSpace(manifest.Name))
+ if (!string.IsNullOrWhiteSpace(manifest.Name))
skippedPrefix = $"Skipped {manifest.Name}";
// validate compatibility
@@ -485,12 +486,11 @@ namespace StardewModdingAPI
}
// initialise mod
- Mod mod;
try
{
// get implementation
TypeInfo modEntryType = modAssembly.DefinedTypes.First(x => x.BaseType == typeof(Mod));
- mod = (Mod)modAssembly.CreateInstance(modEntryType.ToString());
+ Mod mod = (Mod)modAssembly.CreateInstance(modEntryType.ToString());
if (mod == null)
{
this.Monitor.Log($"{skippedPrefix} because its entry class couldn't be instantiated.");
@@ -544,8 +544,8 @@ namespace StardewModdingAPI
Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Game1.version} with {modsLoaded} mods";
}
- // ReSharper disable once FunctionNeverReturns
/// <summary>Run a loop handling console input.</summary>
+ [SuppressMessage("ReSharper", "FunctionNeverReturns", Justification = "The thread is aborted when the game exits.")]
private void ConsoleInputLoop()
{
while (true)