summaryrefslogtreecommitdiff
path: root/src/SMAPI/Events/ItemStackSizeChange.cs
blob: 5d0986aa4c47393983bb31685877e703f55ad857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#nullable disable

using StardewValley;

namespace StardewModdingAPI.Events
{
    /// <summary>An inventory item stack size change.</summary>
    public class ItemStackSizeChange
    {
        /*********
        ** Accessors
        *********/
        /// <summary>The item whose stack size changed.</summary>
        public Item Item { get; }

        /// <summary>The previous stack size.</summary>
        public int OldSize { get; }

        /// <summary>The new stack size.</summary>
        public int NewSize { get; }


        /*********
        ** Public methods
        *********/
        /// <summary>Construct an instance.</summary>
        /// <param name="item">The item whose stack size changed.</param>
        /// <param name="oldSize">The previous stack size.</param>
        /// <param name="newSize">The new stack size.</param>
        public ItemStackSizeChange(Item item, int oldSize, int newSize)
        {
            this.Item = item;
            this.OldSize = oldSize;
            this.NewSize = newSize;
        }
    }
}