summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/StateTracking/Snapshots
diff options
context:
space:
mode:
authorwartech0 <wartech0@hotmail.com>2019-12-29 08:06:02 -0600
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-12-31 16:19:43 -0500
commitaef1b8ac2898e147e6200fe257e8fdd82ee7fdbc (patch)
treede3026eeac70d90e729802b8213cbb4004f2dee9 /src/SMAPI/Framework/StateTracking/Snapshots
parentdca60f42b2048d6b0b27517b9e7686665e61e9c2 (diff)
downloadSMAPI-aef1b8ac2898e147e6200fe257e8fdd82ee7fdbc.tar.gz
SMAPI-aef1b8ac2898e147e6200fe257e8fdd82ee7fdbc.tar.bz2
SMAPI-aef1b8ac2898e147e6200fe257e8fdd82ee7fdbc.zip
Added the new ChestItemChanged event.
Diffstat (limited to 'src/SMAPI/Framework/StateTracking/Snapshots')
-rw-r--r--src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs b/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs
index d3029540..31cf29c3 100644
--- a/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs
+++ b/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs
@@ -33,6 +33,8 @@ namespace StardewModdingAPI.Framework.StateTracking.Snapshots
/// <summary>Tracks added or removed terrain features.</summary>
public SnapshotListDiff<KeyValuePair<Vector2, TerrainFeature>> TerrainFeatures { get; } = new SnapshotListDiff<KeyValuePair<Vector2, TerrainFeature>>();
+ public SnapshotListDiff<Item> ChestItems { get; } = new SnapshotListDiff<Item>();
+
/*********
** Public methods
@@ -54,6 +56,9 @@ namespace StardewModdingAPI.Framework.StateTracking.Snapshots
this.Npcs.Update(watcher.NpcsWatcher);
this.Objects.Update(watcher.ObjectsWatcher);
this.TerrainFeatures.Update(watcher.TerrainFeaturesWatcher);
+
+ foreach (var obj in watcher.activeChestWatchers)
+ this.ChestItems.Update(obj.Value, obj.Key);
}
}
}