summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/WarpedEventArgs.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Events/WarpedEventArgs.cs')
-rw-r--r--src/SMAPI/Events/WarpedEventArgs.cs37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/SMAPI/Events/WarpedEventArgs.cs b/src/SMAPI/Events/WarpedEventArgs.cs
new file mode 100644
index 00000000..1b1c7381
--- /dev/null
+++ b/src/SMAPI/Events/WarpedEventArgs.cs
@@ -0,0 +1,37 @@
+using System;
+using StardewValley;
+
+namespace StardewModdingAPI.Events
+{
+ /// <summary>Event arguments for an <see cref="IPlayerEvents.Warped"/> event.</summary>
+ public class WarpedEventArgs : EventArgs
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The player who warped to a new location.</summary>
+ public Farmer Player { get; }
+
+ /// <summary>The player's previous location.</summary>
+ public GameLocation OldLocation { get; }
+
+ /// <summary>The player's current location.</summary>
+ public GameLocation NewLocation { get; }
+
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="player">The player who warped to a new location.</param>
+ /// <param name="oldLocation">The player's previous location.</param>
+ /// <param name="newLocation">The player's current location.</param>
+ public WarpedEventArgs(Farmer player, GameLocation oldLocation, GameLocation newLocation)
+ {
+ this.Player = player;
+ this.NewLocation = newLocation;
+ this.OldLocation = oldLocation;
+ }
+ }
+}