summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/StateTracking/ChestTracker.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-27 18:09:04 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-05-27 18:09:04 -0400
commit0209e70695b6d12692d4de554ce1fc9d65ca4715 (patch)
tree011867d845ee3cf2a88f306504a4bdd6fe414ed6 /src/SMAPI/Framework/StateTracking/ChestTracker.cs
parent2ab2182645179129997eac3fccb63f6f0683dbe1 (diff)
parente4cd7c8eb09fa50802ce4eb9dbe4683ce61f7a5d (diff)
downloadSMAPI-0209e70695b6d12692d4de554ce1fc9d65ca4715.tar.gz
SMAPI-0209e70695b6d12692d4de554ce1fc9d65ca4715.tar.bz2
SMAPI-0209e70695b6d12692d4de554ce1fc9d65ca4715.zip
Merge branch 'develop' into stable
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)