From dad67e213e68eb85c534d7c1c4035dfde90ff822 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Tue, 4 Dec 2018 23:16:13 -0500 Subject: fix world events in the mines (#603) --- src/SMAPI/Framework/StateTracking/FieldWatchers/WatcherFactory.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/SMAPI/Framework/StateTracking/FieldWatchers/WatcherFactory.cs') diff --git a/src/SMAPI/Framework/StateTracking/FieldWatchers/WatcherFactory.cs b/src/SMAPI/Framework/StateTracking/FieldWatchers/WatcherFactory.cs index ab4ab0d5..8301351e 100644 --- a/src/SMAPI/Framework/StateTracking/FieldWatchers/WatcherFactory.cs +++ b/src/SMAPI/Framework/StateTracking/FieldWatchers/WatcherFactory.cs @@ -36,6 +36,14 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers return new ComparableWatcher(getValue, new ObjectReferenceComparer()); } + /// Get a watcher which detects when an object reference in a collection changes. + /// The value type. + /// The observable collection. + public static ComparableListWatcher ForReferenceList(ICollection collection) + { + return new ComparableListWatcher(collection, new ObjectReferenceComparer()); + } + /// Get a watcher for an observable collection. /// The value type. /// The observable collection. -- cgit