using System; using System.Collections.Generic; using System.Linq; using StardewValley; using StardewValley.Objects; namespace StardewModdingAPI.Events { /// Event arguments for a event. public class FurnitureListChangedEventArgs : EventArgs { /********* ** Accessors *********/ /// The location which changed. public GameLocation Location { get; } /// The furniture added to the location. public IEnumerable Added { get; } /// The furniture removed from the location. public IEnumerable Removed { get; } /// Whether this is the location containing the local player. public bool IsCurrentLocation => object.ReferenceEquals(this.Location, Game1.player?.currentLocation); /********* ** Public methods *********/ /// Construct an instance. /// The location which changed. /// The furniture added to the location. /// The furniture removed from the location. internal FurnitureListChangedEventArgs(GameLocation location, IEnumerable added, IEnumerable removed) { this.Location = location; this.Added = added.ToArray(); this.Removed = removed.ToArray(); } } }