diff options
Diffstat (limited to 'src/SMAPI/Events/ItemStackSizeChange.cs')
-rw-r--r-- | src/SMAPI/Events/ItemStackSizeChange.cs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/SMAPI/Events/ItemStackSizeChange.cs b/src/SMAPI/Events/ItemStackSizeChange.cs new file mode 100644 index 00000000..35369be2 --- /dev/null +++ b/src/SMAPI/Events/ItemStackSizeChange.cs @@ -0,0 +1,35 @@ +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; + } + } +} |