summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/StateTracking/LocationTracker.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2018-06-10 21:33:17 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2018-06-10 21:33:17 -0400
commit930a871018467683510ba39d092d401d7df50861 (patch)
treef9be25b311906b51635c8a155ad0c07d59ba9a44 /src/SMAPI/Framework/StateTracking/LocationTracker.cs
parent235d67623de648499db521606e4b9033d35388e5 (diff)
downloadSMAPI-930a871018467683510ba39d092d401d7df50861.tar.gz
SMAPI-930a871018467683510ba39d092d401d7df50861.tar.bz2
SMAPI-930a871018467683510ba39d092d401d7df50861.zip
add debris list changed event (#310)
Diffstat (limited to 'src/SMAPI/Framework/StateTracking/LocationTracker.cs')
-rw-r--r--src/SMAPI/Framework/StateTracking/LocationTracker.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/StateTracking/LocationTracker.cs b/src/SMAPI/Framework/StateTracking/LocationTracker.cs
index 1b4c0b19..708c0716 100644
--- a/src/SMAPI/Framework/StateTracking/LocationTracker.cs
+++ b/src/SMAPI/Framework/StateTracking/LocationTracker.cs
@@ -33,6 +33,9 @@ namespace StardewModdingAPI.Framework.StateTracking
/// <summary>Tracks added or removed buildings.</summary>
public ICollectionWatcher<Building> BuildingsWatcher { get; }
+ /// <summary>Tracks added or removed debris.</summary>
+ public ICollectionWatcher<Debris> DebrisWatcher { get; }
+
/// <summary>Tracks added or removed large terrain features.</summary>
public ICollectionWatcher<LargeTerrainFeature> LargeTerrainFeaturesWatcher { get; }
@@ -59,6 +62,7 @@ namespace StardewModdingAPI.Framework.StateTracking
this.BuildingsWatcher = location is BuildableGameLocation buildableLocation
? WatcherFactory.ForNetCollection(buildableLocation.buildings)
: (ICollectionWatcher<Building>)WatcherFactory.ForObservableCollection(new ObservableCollection<Building>());
+ this.DebrisWatcher = WatcherFactory.ForNetCollection(location.debris);
this.LargeTerrainFeaturesWatcher = WatcherFactory.ForNetCollection(location.largeTerrainFeatures);
this.NpcsWatcher = WatcherFactory.ForNetCollection(location.characters);
this.ObjectsWatcher = WatcherFactory.ForNetDictionary(location.netObjects);
@@ -67,6 +71,7 @@ namespace StardewModdingAPI.Framework.StateTracking
this.Watchers.AddRange(new IWatcher[]
{
this.BuildingsWatcher,
+ this.DebrisWatcher,
this.LargeTerrainFeaturesWatcher,
this.NpcsWatcher,
this.ObjectsWatcher,