diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-06-14 01:16:50 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2019-09-14 18:04:11 -0400 |
commit | d3209b17de4e46ee1d604aac24642af80ce855cc (patch) | |
tree | cdbb14eed386129b031d9a8c0abf0321a6bba4de /src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs | |
parent | fdf221addee883f4b1ddcd42f92876f7a816c7a1 (diff) | |
download | SMAPI-d3209b17de4e46ee1d604aac24642af80ce855cc.tar.gz SMAPI-d3209b17de4e46ee1d604aac24642af80ce855cc.tar.bz2 SMAPI-d3209b17de4e46ee1d604aac24642af80ce855cc.zip |
decouple updating watchers & raising event to fix some mod changes not being tracked correctly (#648)
Diffstat (limited to 'src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs')
-rw-r--r-- | src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs b/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs index f09c69c1..303a4f3a 100644 --- a/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs +++ b/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs @@ -117,6 +117,13 @@ namespace StardewModdingAPI.Framework.StateTracking watcher.Reset(); } + /// <summary>Get whether the given location is tracked.</summary> + /// <param name="location">The location to check.</param> + public bool HasLocationTracker(GameLocation location) + { + return this.LocationDict.ContainsKey(location); + } + /// <summary>Stop watching the player fields and release all references.</summary> public void Dispose() { |