diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs b/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs index 4e08a1ac..edfba736 100644 --- a/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs +++ b/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs @@ -63,13 +63,12 @@ namespace StardewModdingAPI.Framework.StateTracking.Snapshots this.TerrainFeatures.Update(watcher.TerrainFeaturesWatcher); // chest inventories - foreach (var pair in watcher.ChestWatchers) + this.ChestItems.Clear(); + foreach (ChestTracker tracker in watcher.ChestWatchers.Values) { - ItemStackChange[] changes = pair.Value.GetInventoryChanges().ToArray(); + ItemStackChange[] changes = tracker.GetInventoryChanges().ToArray(); if (changes.Length > 0) - this.ChestItems[pair.Value.Chest] = changes; - else - this.ChestItems.Remove(pair.Value.Chest); + this.ChestItems[tracker.Chest] = changes; } } } |