summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs')
-rw-r--r--src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs b/src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs
new file mode 100644
index 00000000..4c359939
--- /dev/null
+++ b/src/StardewModdingAPI/Events/EventArgsFarmerChanged.cs
@@ -0,0 +1,33 @@
+#if SMAPI_1_x
+using System;
+using SFarmer = StardewValley.Farmer;
+
+namespace StardewModdingAPI.Events
+{
+ /// <summary>Event arguments for a <see cref="PlayerEvents.FarmerChanged"/> event.</summary>
+ public class EventArgsFarmerChanged : EventArgs
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The previous player character.</summary>
+ public SFarmer NewFarmer { get; }
+
+ /// <summary>The new player character.</summary>
+ public SFarmer PriorFarmer { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="priorFarmer">The previous player character.</param>
+ /// <param name="newFarmer">The new player character.</param>
+ public EventArgsFarmerChanged(SFarmer priorFarmer, SFarmer newFarmer)
+ {
+ this.PriorFarmer = priorFarmer;
+ this.NewFarmer = newFarmer;
+ }
+ }
+}
+#endif \ No newline at end of file