From 930a871018467683510ba39d092d401d7df50861 Mon Sep 17 00:00:00 2001
From: Jesse Plamondon-Willard <github@jplamondonw.com>
Date: Sun, 10 Jun 2018 21:33:17 -0400
Subject: add debris list changed event (#310)

---
 src/SMAPI/Framework/StateTracking/LocationTracker.cs | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'src/SMAPI/Framework/StateTracking')

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,
-- 
cgit