From 6bf99f0f81582ab6d6212dc21e8c36686ceb5a35 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 31 Dec 2019 17:32:46 -0500 Subject: minor refactoring --- src/SMAPI/Events/ChestInventoryChangedEventArgs.cs | 20 +++++++++----------- src/SMAPI/Events/ItemStackChange.cs | 5 ----- 2 files changed, 9 insertions(+), 16 deletions(-) (limited to 'src/SMAPI/Events') diff --git a/src/SMAPI/Events/ChestInventoryChangedEventArgs.cs b/src/SMAPI/Events/ChestInventoryChangedEventArgs.cs index a0c63fdc..7771cd7c 100644 --- a/src/SMAPI/Events/ChestInventoryChangedEventArgs.cs +++ b/src/SMAPI/Events/ChestInventoryChangedEventArgs.cs @@ -1,8 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Xna.Framework; using StardewValley; +using StardewValley.Objects; namespace StardewModdingAPI.Events { @@ -12,24 +10,24 @@ namespace StardewModdingAPI.Events /********* ** Accessors *********/ + /// The chest whose inventory changed. + public Chest Chest { get; } + /// The location containing the chest. public GameLocation Location { get; } - /// The tile position of the chest. - public StardewValley.Objects.Chest Chest { get; } - - /// The inventory changes added to the chest. + /// The inventory changes in the chest. public ItemStackChange[] Changes { get; } + /********* ** Public methods *********/ /// Construct an instance. + /// The chest whose inventory changed. /// The location containing the chest. - /// The tile position of the chest. - /// The objects added to the location. - /// The objects removed from the location. - internal ChestInventoryChangedEventArgs(GameLocation location, StardewValley.Objects.Chest chest, ItemStackChange[] changes) + /// The inventory changes in the chest. + internal ChestInventoryChangedEventArgs(Chest chest, GameLocation location, ItemStackChange[] changes) { this.Location = location; this.Chest = chest; diff --git a/src/SMAPI/Events/ItemStackChange.cs b/src/SMAPI/Events/ItemStackChange.cs index dbb529d6..cb5d2b88 100644 --- a/src/SMAPI/Events/ItemStackChange.cs +++ b/src/SMAPI/Events/ItemStackChange.cs @@ -16,10 +16,5 @@ namespace StardewModdingAPI.Events /// How the inventory slot changed. public ChangeType ChangeType { get; set; } - - public override string ToString() - { - return this.StackChange + " " + this.Item.Name + " " + this.ChangeType.ToString(); - } } } -- cgit