diff options
-rw-r--r-- | src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs | 8 | ||||
-rw-r--r-- | src/StardewModdingAPI/Events/PlayerEvents.cs | 3 | ||||
-rw-r--r-- | src/StardewModdingAPI/Framework/SGame.cs | 6 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs b/src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs index 273f9d25..699d90be 100644 --- a/src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs +++ b/src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs @@ -1,5 +1,5 @@ using System; -using StardewValley; +using SFarmer = StardewValley.Farmer; namespace StardewModdingAPI.Events { @@ -10,10 +10,10 @@ namespace StardewModdingAPI.Events ** Accessors *********/ /// <summary>The previous player character.</summary> - public Farmer NewFarmer { get; } + public SFarmer NewFarmer { get; } /// <summary>The new player character.</summary> - public Farmer PriorFarmer { get; } + public SFarmer PriorFarmer { get; } /********* @@ -22,7 +22,7 @@ namespace StardewModdingAPI.Events /// <summary>Construct an instance.</summary> /// <param name="priorFarmer">The previous player character.</param> /// <param name="newFarmer">The new player character.</param> - public EventArgsFarmerChanged(Farmer priorFarmer, Farmer newFarmer) + public EventArgsFarmerChanged(SFarmer priorFarmer, SFarmer newFarmer) { this.PriorFarmer = priorFarmer; this.NewFarmer = newFarmer; diff --git a/src/StardewModdingAPI/Events/PlayerEvents.cs b/src/StardewModdingAPI/Events/PlayerEvents.cs index 6e65f5ae..99bdac16 100644 --- a/src/StardewModdingAPI/Events/PlayerEvents.cs +++ b/src/StardewModdingAPI/Events/PlayerEvents.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using StardewModdingAPI.Framework; using StardewValley; +using SFarmer = StardewValley.Farmer; namespace StardewModdingAPI.Events { @@ -49,7 +50,7 @@ namespace StardewModdingAPI.Events /// <param name="monitor">Encapsulates monitoring and logging.</param> /// <param name="priorFarmer">The previous player character.</param> /// <param name="newFarmer">The new player character.</param> - internal static void InvokeFarmerChanged(IMonitor monitor, Farmer priorFarmer, Farmer newFarmer) + internal static void InvokeFarmerChanged(IMonitor monitor, SFarmer priorFarmer, SFarmer newFarmer) { if (PlayerEvents.FarmerChanged == null) return; diff --git a/src/StardewModdingAPI/Framework/SGame.cs b/src/StardewModdingAPI/Framework/SGame.cs index 2486e376..2aaca9af 100644 --- a/src/StardewModdingAPI/Framework/SGame.cs +++ b/src/StardewModdingAPI/Framework/SGame.cs @@ -14,6 +14,7 @@ using StardewValley.Menus; using StardewValley.Tools; using xTile.Dimensions; using Rectangle = Microsoft.Xna.Framework.Rectangle; +using SFarmer = StardewValley.Farmer; namespace StardewModdingAPI.Framework { @@ -131,7 +132,7 @@ namespace StardewModdingAPI.Framework public bool PreviousIsNewDay { get; private set; } /// <summary>The player character at last check.</summary> - public Farmer PreviousFarmer { get; private set; } + public SFarmer PreviousFarmer { get; private set; } /// <summary>An index incremented on every tick and reset every 60th tick (0–59).</summary> public int CurrentUpdateTick { get; private set; } @@ -164,7 +165,7 @@ namespace StardewModdingAPI.Framework /// <summary>The current player.</summary> [Obsolete("Use Game1.player instead")] - public Farmer CurrentFarmer => Game1.player; + public SFarmer CurrentFarmer => Game1.player; /// <summary>The game method which draws the farm buildings.</summary> public static MethodInfo DrawFarmBuildings = typeof(Game1).GetMethod("drawFarmBuildings", BindingFlags.NonPublic | BindingFlags.Instance); @@ -296,7 +297,6 @@ namespace StardewModdingAPI.Framework /// <summary>The method called during game launch after configuring XNA or MonoGame. The game window hasn't been opened by this point.</summary> protected override void Initialize() { - //ModItems = new Dictionary<int, SObject>(); SGame.DebugMessageQueue = new Queue<string>(); this.PreviouslyPressedButtons = new Buttons[4][]; for (var i = 0; i < 4; ++i) |