diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-05-06 23:04:36 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-05-06 23:04:36 -0400 |
commit | f3cc08a52679fbe21c86e6df7c5750c9df93525f (patch) | |
tree | a794b675720a4afed8f56b93dff0ef6ac1c2c880 | |
parent | 1827e9f0718da2e8a285d94b3d5e35b465247cdf (diff) | |
download | SMAPI-f3cc08a52679fbe21c86e6df7c5750c9df93525f.tar.gz SMAPI-f3cc08a52679fbe21c86e6df7c5750c9df93525f.tar.bz2 SMAPI-f3cc08a52679fbe21c86e6df7c5750c9df93525f.zip |
fix new events losing track of changed data
-rw-r--r-- | src/SMAPI/Framework/SGame.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI/Framework/SGame.cs b/src/SMAPI/Framework/SGame.cs index 63f7f073..70462559 100644 --- a/src/SMAPI/Framework/SGame.cs +++ b/src/SMAPI/Framework/SGame.cs @@ -528,8 +528,8 @@ namespace StardewModdingAPI.Framework if (watcher.ObjectsWatcher.IsChanged) { GameLocation location = watcher.Location; - var added = watcher.ObjectsWatcher.Added; - var removed = watcher.ObjectsWatcher.Removed; + var added = watcher.ObjectsWatcher.Added.ToArray(); + var removed = watcher.ObjectsWatcher.Removed.ToArray(); watcher.ObjectsWatcher.Reset(); this.Events.Location_ObjectsChanged.Raise(new EventArgsLocationObjectsChanged(location, added, removed)); @@ -539,8 +539,8 @@ namespace StardewModdingAPI.Framework if (watcher.BuildingsWatcher.IsChanged) { GameLocation location = watcher.Location; - var added = watcher.BuildingsWatcher.Added; - var removed = watcher.BuildingsWatcher.Removed; + var added = watcher.BuildingsWatcher.Added.ToArray(); + var removed = watcher.BuildingsWatcher.Removed.ToArray(); watcher.BuildingsWatcher.Reset(); this.Events.Location_BuildingsChanged.Raise(new EventArgsLocationBuildingsChanged(location, added, removed)); |