summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-04-23 23:00:51 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-04-23 23:00:51 -0400
commita9c220c0fe0fd6f52bee73a8f5da91fd1d007d0f (patch)
tree18cb834bce4eb7f6ae0aa7f9f088124fb3cfe913 /src
parent8ec607ba3c1d672f5aeac065dd19dc3514e209c4 (diff)
downloadSMAPI-a9c220c0fe0fd6f52bee73a8f5da91fd1d007d0f.tar.gz
SMAPI-a9c220c0fe0fd6f52bee73a8f5da91fd1d007d0f.tar.bz2
SMAPI-a9c220c0fe0fd6f52bee73a8f5da91fd1d007d0f.zip
minor cleanup
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI.Installer/InteractiveInstaller.cs3
-rw-r--r--src/StardewModdingAPI/Events/GameEvents.cs5
-rw-r--r--src/StardewModdingAPI/Framework/Monitor.cs2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs
index c456fdc0..38c19d2b 100644
--- a/src/StardewModdingAPI.Installer/InteractiveInstaller.cs
+++ b/src/StardewModdingAPI.Installer/InteractiveInstaller.cs
@@ -626,9 +626,8 @@ namespace StardewModdingApi.Installer
private void Move(FileSystemInfo entry, string newPath)
{
// file
- if (entry is FileInfo)
+ if (entry is FileInfo file)
{
- FileInfo file = (FileInfo)entry;
file.CopyTo(newPath);
file.Delete();
}
diff --git a/src/StardewModdingAPI/Events/GameEvents.cs b/src/StardewModdingAPI/Events/GameEvents.cs
index babf7f31..029ec1f9 100644
--- a/src/StardewModdingAPI/Events/GameEvents.cs
+++ b/src/StardewModdingAPI/Events/GameEvents.cs
@@ -1,5 +1,4 @@
using System;
-using System.Linq;
using StardewModdingAPI.Framework;
namespace StardewModdingAPI.Events
@@ -21,11 +20,11 @@ namespace StardewModdingAPI.Events
internal static event EventHandler InitializeInternal;
/// <summary>Raised during launch after configuring XNA or MonoGame. The game window hasn't been opened by this point. Called after <see cref="Microsoft.Xna.Framework.Game.Initialize"/>.</summary>
- [Obsolete("The " + nameof(Mod) + "." + nameof(Mod.Entry) + " method is now called after the " + nameof(Initialize) + " event, so any contained logic can be done directly in " + nameof(Mod.Entry) + ".")]
+ [Obsolete("The " + nameof(Mod) + "." + nameof(Mod.Entry) + " method is now called after the " + nameof(GameEvents.Initialize) + " event, so any contained logic can be done directly in " + nameof(Mod.Entry) + ".")]
public static event EventHandler Initialize;
/// <summary>Raised before XNA loads or reloads graphics resources. Called during <see cref="Microsoft.Xna.Framework.Game.LoadContent"/>.</summary>
- [Obsolete("The " + nameof(Mod) + "." + nameof(Mod.Entry) + " method is now called after the " + nameof(LoadContent) + " event, so any contained logic can be done directly in " + nameof(Mod.Entry) + ".")]
+ [Obsolete("The " + nameof(Mod) + "." + nameof(Mod.Entry) + " method is now called after the " + nameof(GameEvents.LoadContent) + " event, so any contained logic can be done directly in " + nameof(Mod.Entry) + ".")]
public static event EventHandler LoadContent;
/// <summary>Raised during launch after configuring Stardew Valley, loading it into memory, and opening the game window. The window is still blank by this point.</summary>
diff --git a/src/StardewModdingAPI/Framework/Monitor.cs b/src/StardewModdingAPI/Framework/Monitor.cs
index 76793bbf..51feff78 100644
--- a/src/StardewModdingAPI/Framework/Monitor.cs
+++ b/src/StardewModdingAPI/Framework/Monitor.cs
@@ -35,7 +35,7 @@ namespace StardewModdingAPI.Framework
};
/// <summary>A delegate which requests that SMAPI immediately exit the game. This should only be invoked when an irrecoverable fatal error happens that risks save corruption or game-breaking bugs.</summary>
- private RequestExitDelegate RequestExit;
+ private readonly RequestExitDelegate RequestExit;
/*********