summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/StateTracking/LocationTracker.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2021-05-26 20:04:46 -0400
committerGitHub <noreply@github.com>2021-05-26 20:04:46 -0400
commitce84bbd9aed0942b3cff921cd6eea8095023bde9 (patch)
treea32b0cbef014a907479bc98cb3804e246623604f /src/SMAPI/Framework/StateTracking/LocationTracker.cs
parent112b505118e65d2741a5cfebce44abd02742dd2f (diff)
parent9d7b31afc45b89278f5a74697da51a47215d6592 (diff)
downloadSMAPI-ce84bbd9aed0942b3cff921cd6eea8095023bde9.tar.gz
SMAPI-ce84bbd9aed0942b3cff921cd6eea8095023bde9.tar.bz2
SMAPI-ce84bbd9aed0942b3cff921cd6eea8095023bde9.zip
Merge pull request #779 from DiscipleOfEris/develop
Add `World.FurnitureListChanged` event
Diffstat (limited to 'src/SMAPI/Framework/StateTracking/LocationTracker.cs')
-rw-r--r--src/SMAPI/Framework/StateTracking/LocationTracker.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/StateTracking/LocationTracker.cs b/src/SMAPI/Framework/StateTracking/LocationTracker.cs
index 519fe8f4..6d3a62bb 100644
--- a/src/SMAPI/Framework/StateTracking/LocationTracker.cs
+++ b/src/SMAPI/Framework/StateTracking/LocationTracker.cs
@@ -48,6 +48,9 @@ namespace StardewModdingAPI.Framework.StateTracking
/// <summary>Tracks added or removed terrain features.</summary>
public IDictionaryWatcher<Vector2, TerrainFeature> TerrainFeaturesWatcher { get; }
+ /// <summary>Tracks added or removed furniture.</summary>
+ public ICollectionWatcher<Furniture> FurnitureWatcher { get; }
+
/// <summary>Tracks items added or removed to chests.</summary>
public IDictionary<Vector2, ChestTracker> ChestWatchers { get; } = new Dictionary<Vector2, ChestTracker>();
@@ -68,6 +71,7 @@ namespace StardewModdingAPI.Framework.StateTracking
this.NpcsWatcher = WatcherFactory.ForNetCollection(location.characters);
this.ObjectsWatcher = WatcherFactory.ForNetDictionary(location.netObjects);
this.TerrainFeaturesWatcher = WatcherFactory.ForNetDictionary(location.terrainFeatures);
+ this.FurnitureWatcher = WatcherFactory.ForNetCollection(location.furniture);
this.Watchers.AddRange(new IWatcher[]
{
@@ -76,7 +80,8 @@ namespace StardewModdingAPI.Framework.StateTracking
this.LargeTerrainFeaturesWatcher,
this.NpcsWatcher,
this.ObjectsWatcher,
- this.TerrainFeaturesWatcher
+ this.TerrainFeaturesWatcher,
+ this.FurnitureWatcher
});
this.UpdateChestWatcherList(added: location.Objects.Pairs, removed: new KeyValuePair<Vector2, SObject>[0]);