summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/SGame.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/SGame.cs')
-rw-r--r--src/SMAPI/Framework/SGame.cs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs
index 564fec1d..64da1cf1 100644
--- a/src/SMAPI/Framework/SGame.cs
+++ b/src/SMAPI/Framework/SGame.cs
@@ -703,8 +703,15 @@ namespace StardewModdingAPI.Framework
events.ObjectListChanged.Raise(new ObjectListChangedEventArgs(location, locState.Objects.Added, locState.Objects.Removed));
// chest items changed
- if (locState.ChestItems.IsChanged)
- events.ChestItemsChanged.Raise(new ChestItemChangedEventArgs(location, locState.ChestItems.Added, locState.ChestItems.Removed, locState.ChestItems.Key));
+ if (events.ChestInventoryChanged.HasListeners())
+ {
+ foreach (var pair in locState.ChestItems)
+ {
+ var diff = pair.Value;
+ if (diff.IsChanged)
+ events.ChestInventoryChanged.Raise(new ChestInventoryChangedEventArgs(location, pair.Key, diff.Added, diff.Removed));
+ }
+ }
// terrain features changed
if (locState.TerrainFeatures.IsChanged)