using System;
using System.Collections.Generic;
using StardewValley;
namespace StardewModdingAPI.Events
{
/// Event arguments for an event.
public class InventoryChangedEventArgs : EventArgs
{
/*********
** Accessors
*********/
/// The player whose inventory changed.
public Farmer Player { get; }
/// The added item stacks.
public IEnumerable- Added { get; }
/// The removed item stacks.
public IEnumerable
- Removed { get; }
/// The item stacks whose size changed.
public IEnumerable QuantityChanged { get; }
/// Whether the affected player is the local one.
public bool IsLocalPlayer => this.Player.IsLocalPlayer;
/*********
** Public methods
*********/
/// Construct an instance.
/// The player whose inventory changed.
/// The added item stacks.
/// The removed item stacks.
/// The item stacks whose size changed.
internal InventoryChangedEventArgs(Farmer player, Item[] added, Item[] removed, ItemStackSizeChange[] quantityChanged)
{
this.Player = player;
this.Added = added;
this.Removed = removed;
this.QuantityChanged = quantityChanged;
}
}
}