using System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Netcode; using StardewValley; using SObject = StardewValley.Object; namespace StardewModdingAPI.Events { /// Event arguments for a or event. public class EventArgsLocationObjectsChanged : EventArgs { /********* ** Accessors *********/ /// The location which changed. public GameLocation Location { get; } /// The objects added to the list. public IEnumerable> Added { get; } /// The objects removed from the list. public IEnumerable> Removed { get; } /// The current list of objects in the current location. [Obsolete("Use " + nameof(EventArgsLocationObjectsChanged.Added))] public IDictionary> NewObjects { get; } /********* ** Public methods *********/ /// Construct an instance. /// The location which changed. /// The objects added to the list. /// The objects removed from the list. /// The current list of objects in the current location. public EventArgsLocationObjectsChanged(GameLocation location, IEnumerable> added, IEnumerable> removed, IDictionary> newObjects) { this.Location = location; this.Added = added.ToArray(); this.Removed = removed.ToArray(); this.NewObjects = newObjects; } } }