summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/StateTracking/ChestTracker.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/StateTracking/ChestTracker.cs')
-rw-r--r--src/SMAPI/Framework/StateTracking/ChestTracker.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/StateTracking/ChestTracker.cs b/src/SMAPI/Framework/StateTracking/ChestTracker.cs
index c33a7498..2796ad54 100644
--- a/src/SMAPI/Framework/StateTracking/ChestTracker.cs
+++ b/src/SMAPI/Framework/StateTracking/ChestTracker.cs
@@ -39,11 +39,12 @@ namespace StardewModdingAPI.Framework.StateTracking
** Public methods
*********/
/// <summary>Construct an instance.</summary>
+ /// <param name="name">A name which identifies what the watcher is watching, used for troubleshooting.</param>
/// <param name="chest">The chest being tracked.</param>
- public ChestTracker(Chest chest)
+ public ChestTracker(string name, Chest chest)
{
this.Chest = chest;
- this.InventoryWatcher = WatcherFactory.ForNetList(chest.items);
+ this.InventoryWatcher = WatcherFactory.ForNetList($"{name}.{nameof(chest.items)}", chest.items);
this.StackSizes = this.Chest.items
.Where(n => n != null)