summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/WorldLocationsChangedEventArgs.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Events/WorldLocationsChangedEventArgs.cs')
-rw-r--r--src/SMAPI/Events/WorldLocationsChangedEventArgs.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/SMAPI/Events/WorldLocationsChangedEventArgs.cs b/src/SMAPI/Events/WorldLocationsChangedEventArgs.cs
new file mode 100644
index 00000000..5cf77959
--- /dev/null
+++ b/src/SMAPI/Events/WorldLocationsChangedEventArgs.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using StardewValley;
+
+namespace StardewModdingAPI.Events
+{
+ /// <summary>Event arguments for a <see cref="IWorldEvents.LocationsChanged"/> event.</summary>
+ public class WorldLocationsChangedEventArgs : EventArgs
+ {
+ /*********
+ ** Accessors
+ *********/
+ /// <summary>The added locations.</summary>
+ public IEnumerable<GameLocation> Added { get; }
+
+ /// <summary>The removed locations.</summary>
+ public IEnumerable<GameLocation> Removed { get; }
+
+
+ /*********
+ ** Public methods
+ *********/
+ /// <summary>Construct an instance.</summary>
+ /// <param name="added">The added locations.</param>
+ /// <param name="removed">The removed locations.</param>
+ public WorldLocationsChangedEventArgs(IEnumerable<GameLocation> added, IEnumerable<GameLocation> removed)
+ {
+ this.Added = added.ToArray();
+ this.Removed = removed.ToArray();
+ }
+ }
+}