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