diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..cd1acd35
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# normalise line endings
+* text=auto
diff --git a/src/StardewModdingAPI.sln b/src/StardewModdingAPI.sln
index 9c999731..29c80e89 100644
--- a/src/StardewModdingAPI.sln
+++ b/src/StardewModdingAPI.sln
@@ -1,72 +1,73 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrainerMod", "TrainerMod\TrainerMod.csproj", "{28480467-1A48-46A7-99F8-236D95225359}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StardewModdingAPI", "StardewModdingAPI\StardewModdingAPI.csproj", "{F1A573B0-F436-472C-AE29-0B91EA6B9F8F}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "metadata", "metadata", "{86C452BE-D2D8-45B4-B63F-E329EB06CEDA}"
- ProjectSection(SolutionItems) = preProject
- ..\.gitignore = ..\.gitignore
- ..\LICENSE = ..\LICENSE
- ..\README.md = ..\README.md
- ..\release-notes.md = ..\release-notes.md
- EndProjectSection
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StardewModdingAPI.Installer", "StardewModdingAPI.Installer\StardewModdingAPI.Installer.csproj", "{443DDF81-6AAF-420A-A610-3459F37E5575}"
- ProjectSection(ProjectDependencies) = postProject
- {28480467-1A48-46A7-99F8-236D95225359} = {28480467-1A48-46A7-99F8-236D95225359}
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F} = {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {28480467-1A48-46A7-99F8-236D95225359}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {28480467-1A48-46A7-99F8-236D95225359}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {28480467-1A48-46A7-99F8-236D95225359}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {28480467-1A48-46A7-99F8-236D95225359}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {28480467-1A48-46A7-99F8-236D95225359}.Debug|x86.ActiveCfg = Debug|Any CPU
- {28480467-1A48-46A7-99F8-236D95225359}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {28480467-1A48-46A7-99F8-236D95225359}.Release|Any CPU.Build.0 = Release|Any CPU
- {28480467-1A48-46A7-99F8-236D95225359}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {28480467-1A48-46A7-99F8-236D95225359}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {28480467-1A48-46A7-99F8-236D95225359}.Release|x86.ActiveCfg = Release|Any CPU
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|x86.ActiveCfg = Debug|x86
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|x86.Build.0 = Debug|x86
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Any CPU.Build.0 = Release|Any CPU
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Mixed Platforms.Build.0 = Release|x86
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|x86.ActiveCfg = Release|x86
- {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|x86.Build.0 = Release|x86
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|x86.ActiveCfg = Debug|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|x86.Build.0 = Debug|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|Any CPU.Build.0 = Release|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|x86.ActiveCfg = Release|Any CPU
- {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|x86.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrainerMod", "TrainerMod\TrainerMod.csproj", "{28480467-1A48-46A7-99F8-236D95225359}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StardewModdingAPI", "StardewModdingAPI\StardewModdingAPI.csproj", "{F1A573B0-F436-472C-AE29-0B91EA6B9F8F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "metadata", "metadata", "{86C452BE-D2D8-45B4-B63F-E329EB06CEDA}"
+ ProjectSection(SolutionItems) = preProject
+ ..\.gitattributes = ..\.gitattributes
+ ..\.gitignore = ..\.gitignore
+ ..\LICENSE = ..\LICENSE
+ ..\README.md = ..\README.md
+ ..\release-notes.md = ..\release-notes.md
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StardewModdingAPI.Installer", "StardewModdingAPI.Installer\StardewModdingAPI.Installer.csproj", "{443DDF81-6AAF-420A-A610-3459F37E5575}"
+ ProjectSection(ProjectDependencies) = postProject
+ {28480467-1A48-46A7-99F8-236D95225359} = {28480467-1A48-46A7-99F8-236D95225359}
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F} = {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {28480467-1A48-46A7-99F8-236D95225359}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28480467-1A48-46A7-99F8-236D95225359}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28480467-1A48-46A7-99F8-236D95225359}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {28480467-1A48-46A7-99F8-236D95225359}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {28480467-1A48-46A7-99F8-236D95225359}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {28480467-1A48-46A7-99F8-236D95225359}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28480467-1A48-46A7-99F8-236D95225359}.Release|Any CPU.Build.0 = Release|Any CPU
+ {28480467-1A48-46A7-99F8-236D95225359}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {28480467-1A48-46A7-99F8-236D95225359}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {28480467-1A48-46A7-99F8-236D95225359}.Release|x86.ActiveCfg = Release|Any CPU
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|x86.ActiveCfg = Debug|x86
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Debug|x86.Build.0 = Debug|x86
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|Mixed Platforms.Build.0 = Release|x86
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|x86.ActiveCfg = Release|x86
+ {F1A573B0-F436-472C-AE29-0B91EA6B9F8F}.Release|x86.Build.0 = Release|x86
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Debug|x86.Build.0 = Debug|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|Any CPU.Build.0 = Release|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|x86.ActiveCfg = Release|Any CPU
+ {443DDF81-6AAF-420A-A610-3459F37E5575}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/src/StardewModdingAPI/Inheritance/ItemStackChange.cs b/src/StardewModdingAPI/Inheritance/ItemStackChange.cs
index 78775094..8abe3a76 100644
--- a/src/StardewModdingAPI/Inheritance/ItemStackChange.cs
+++ b/src/StardewModdingAPI/Inheritance/ItemStackChange.cs
@@ -1,11 +1,11 @@
-using StardewValley;
-
-namespace StardewModdingAPI.Inheritance
-{
- public class ItemStackChange
- {
- public Item Item { get; set; }
- public int StackChange { get; set; }
- public ChangeType ChangeType { get; set; }
- }
+using StardewValley;
+
+namespace StardewModdingAPI.Inheritance
+{
+ public class ItemStackChange
+ {
+ public Item Item { get; set; }
+ public int StackChange { get; set; }
+ public ChangeType ChangeType { get; set; }
+ }
}
\ No newline at end of file
diff --git a/src/StardewModdingAPI/Inheritance/SGame.cs b/src/StardewModdingAPI/Inheritance/SGame.cs
index 26421136..808f0812 100644
--- a/src/StardewModdingAPI/Inheritance/SGame.cs
+++ b/src/StardewModdingAPI/Inheritance/SGame.cs
@@ -1,1340 +1,1340 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-using StardewModdingAPI.Events;
-using StardewValley;
-using StardewValley.BellsAndWhistles;
-using StardewValley.Locations;
-using StardewValley.Menus;
-using StardewValley.Tools;
-using xTile.Dimensions;
-using Rectangle = Microsoft.Xna.Framework.Rectangle;
-
-namespace StardewModdingAPI.Inheritance
-{
- ///
- /// The 'SGame' class.
- /// This summary, and many others, only exists because XML doc tags.
- ///
- public class SGame : Game1
- {
- private bool FireLoadedGameEvent;
-
- ///
- /// Gets a jagged array of all buttons pressed on the gamepad the prior frame.
- ///
- public Buttons[][] PreviouslyPressedButtons;
-
- internal SGame()
- {
- Instance = this;
- FirstUpdate = true;
- }
-
- ///
- /// The current KeyboardState
- ///
- public KeyboardState KStateNow { get; private set; }
- ///
- /// The prior KeyboardState
- ///
- public KeyboardState KStatePrior { get; private set; }
-
- ///
- /// The current MouseState
- ///
- public MouseState MStateNow { get; private set; }
-
- ///
- /// The prior MouseState
- ///
- public MouseState MStatePrior { get; private set; }
-
- /// The current mouse position on the screen adjusted for the zoom level.
- public Point MPositionNow { get; private set; }
-
- /// The previous mouse position on the screen adjusted for the zoom level.
- public Point MPositionPrior { get; private set; }
-
- ///
- /// All keys pressed on the current frame
- ///
- public Keys[] CurrentlyPressedKeys => KStateNow.GetPressedKeys();
-
- ///
- /// All keys pressed on the prior frame
- ///
- public Keys[] PreviouslyPressedKeys => KStatePrior.GetPressedKeys();
-
- ///
- /// All keys pressed on this frame except for the ones pressed on the prior frame
- ///
- public Keys[] FramePressedKeys => CurrentlyPressedKeys.Except(PreviouslyPressedKeys).ToArray();
-
- ///
- /// All keys pressed on the prior frame except for the ones pressed on the current frame
- ///
- public Keys[] FrameReleasedKeys => PreviouslyPressedKeys.Except(CurrentlyPressedKeys).ToArray();
-
- ///
- /// Whether or not a save was tagged as 'Loaded' the prior frame.
- ///
- public bool PreviouslyLoadedGame { get; private set; }
-
- ///
- /// The list of GameLocations on the prior frame
- ///
- public int PreviousGameLocations { get; private set; }
-
- ///
- /// The list of GameObjects on the prior frame
- ///
- public int PreviousLocationObjects { get; private set; }
-
- ///
- /// The list of Items in the player's inventory on the prior frame
- ///
- public Dictionary- PreviousItems { get; private set; }
-
- ///
- /// The player's Combat level on the prior frame
- ///
- public int PreviousCombatLevel { get; private set; }
- ///
- /// The player's Farming level on the prior frame
- ///
- public int PreviousFarmingLevel { get; private set; }
- ///
- /// The player's Fishing level on the prior frame
- ///
- public int PreviousFishingLevel { get; private set; }
- ///
- /// The player's Foraging level on the prior frame
- ///
- public int PreviousForagingLevel { get; private set; }
- ///
- /// The player's Mining level on the prior frame
- ///
- public int PreviousMiningLevel { get; private set; }
- ///
- /// The player's Luck level on the prior frame
- ///
- public int PreviousLuckLevel { get; private set; }
-
- //Kill me now comments are so boring
-
- ///
- /// The player's previous game location
- ///
- public GameLocation PreviousGameLocation { get; private set; }
-
- ///
- /// The previous ActiveGameMenu in Game1
- ///
- public IClickableMenu PreviousActiveMenu { get; private set; }
-
- ///
- /// Indicates if the MenuClosed event was fired to prevent it from re-firing.
- ///
- internal bool WasMenuClosedInvoked = false;
-
- ///
- /// The previous mine level
- ///
- public int PreviousMineLevel { get; private set; }
-
- ///
- /// The previous TimeOfDay (Int32 between 600 and 2400?)
- ///
- public int PreviousTimeOfDay { get; private set; }
-
- ///
- /// The previous DayOfMonth (Int32 between 1 and 28?)
- ///
- public int PreviousDayOfMonth { get; private set; }
-
- ///
- /// The previous Season (String as follows: "winter", "spring", "summer", "fall")
- ///
- public string PreviousSeasonOfYear { get; private set; }
-
- ///
- /// The previous Year
- ///
- public int PreviousYearOfGame { get; private set; }
-
- ///
- /// The previous result of Game1.newDay
- ///
- public bool PreviousIsNewDay { get; private set; }
-
- ///
- /// The previous 'Farmer' (Player)
- ///
- public Farmer PreviousFarmer { get; private set; }
-
- ///
- /// The current index of the update tick. Recycles every 60th tick to 0. (Int32 between 0 and 59)
- ///
- public int CurrentUpdateTick { get; private set; }
-
- ///
- /// Whether or not this update frame is the very first of the entire game
- ///
- public bool FirstUpdate { get; private set; }
-
- ///
- /// The current RenderTarget in Game1 (Private field, uses reflection)
- ///
- public RenderTarget2D Screen
- {
- get { return typeof (Game1).GetBaseFieldValue(Program.gamePtr, "screen"); }
- set { typeof (Game1).SetBaseFieldValue(this, "screen", value); }
- }
-
- ///
- /// The current Colour in Game1 (Private field, uses reflection)
- ///
- public Color BgColour
- {
- get { return (Color)typeof(Game1).GetBaseFieldValue