diff options
Diffstat (limited to 'src/SMAPI/Events/DebrisListChangedEventArgs.cs')
-rw-r--r-- | src/SMAPI/Events/DebrisListChangedEventArgs.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/SMAPI/Events/DebrisListChangedEventArgs.cs b/src/SMAPI/Events/DebrisListChangedEventArgs.cs new file mode 100644 index 00000000..1337bd3b --- /dev/null +++ b/src/SMAPI/Events/DebrisListChangedEventArgs.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.DebrisListChanged"/> event.</summary> + public class DebrisListChangedEventArgs : EventArgs + { + /********* + ** Accessors + *********/ + /// <summary>The location which changed.</summary> + public GameLocation Location { get; } + + /// <summary>The debris added to the location.</summary> + public IEnumerable<Debris> Added { get; } + + /// <summary>The debris removed from the location.</summary> + public IEnumerable<Debris> Removed { get; } + + + /********* + ** Public methods + *********/ + /// <summary>Construct an instance.</summary> + /// <param name="location">The location which changed.</param> + /// <param name="added">The debris added to the location.</param> + /// <param name="removed">The debris removed from the location.</param> + public DebrisListChangedEventArgs(GameLocation location, IEnumerable<Debris> added, IEnumerable<Debris> removed) + { + this.Location = location; + this.Added = added.ToArray(); + this.Removed = removed.ToArray(); + } + } +} |