diff options
author | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-07 16:40:19 -0500 |
---|---|---|
committer | Jesse Plamondon-Willard <Pathoschild@users.noreply.github.com> | 2018-12-07 16:40:19 -0500 |
commit | 13ed6decf55a7fd72c34b965397011d3012cb9cc (patch) | |
tree | e0e1f96a2e8a24c116a437126c89cc4ba5a1c430 /src/SMAPI | |
parent | a78b1935928919694dfe8de823a1accd6d222732 (diff) | |
parent | 2b3fb71f6a67cb275a71c5f86040db3286310364 (diff) | |
download | SMAPI-13ed6decf55a7fd72c34b965397011d3012cb9cc.tar.gz SMAPI-13ed6decf55a7fd72c34b965397011d3012cb9cc.tar.bz2 SMAPI-13ed6decf55a7fd72c34b965397011d3012cb9cc.zip |
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI')
-rw-r--r-- | src/SMAPI/Constants.cs | 2 | ||||
-rw-r--r-- | src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs | 16 | ||||
-rw-r--r-- | src/SMAPI/Metadata/CoreAssetPropagator.cs | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs index 6a1cd188..959ab3c7 100644 --- a/src/SMAPI/Constants.cs +++ b/src/SMAPI/Constants.cs @@ -29,7 +29,7 @@ namespace StardewModdingAPI ** Public ****/ /// <summary>SMAPI's current semantic version.</summary> - public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.9.0"); + public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.9.1"); /// <summary>The minimum supported version of Stardew Valley.</summary> public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.3.32"); diff --git a/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs b/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs index d9d598f8..930a8102 100644 --- a/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs +++ b/src/SMAPI/Framework/StateTracking/WorldLocationsTracker.cs @@ -62,9 +62,13 @@ namespace StardewModdingAPI.Framework.StateTracking /// <summary>Update the current value if needed.</summary> public void Update() { - // detect added/removed locations + // update watchers this.LocationListWatcher.Update(); this.MineLocationListWatcher.Update(); + foreach (LocationTracker watcher in this.Locations) + watcher.Update(); + + // detect added/removed locations if (this.LocationListWatcher.IsChanged) { this.Remove(this.LocationListWatcher.Removed); @@ -77,14 +81,10 @@ namespace StardewModdingAPI.Framework.StateTracking } // detect building changed - foreach (LocationTracker watcher in this.Locations.ToArray()) + foreach (LocationTracker watcher in this.Locations.Where(p => p.BuildingsWatcher.IsChanged).ToArray()) { - watcher.Update(); - if (watcher.BuildingsWatcher.IsChanged) - { - this.Remove(watcher.BuildingsWatcher.Removed); - this.Add(watcher.BuildingsWatcher.Added); - } + this.Remove(watcher.BuildingsWatcher.Removed); + this.Add(watcher.BuildingsWatcher.Added); } // detect building interiors changed (e.g. construction completed) diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index d273c251..90629d7f 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -92,7 +92,7 @@ namespace StardewModdingAPI.Metadata bool anyChanged = false; foreach (GameLocation location in this.GetLocations()) { - if (this.GetNormalisedPath(location.mapPath.Value) == key) + if (!string.IsNullOrWhiteSpace(location.mapPath.Value) && this.GetNormalisedPath(location.mapPath.Value) == key) { this.Reflection.GetMethod(location, "reloadMap").Invoke(); this.Reflection.GetMethod(location, "updateWarps").Invoke(); |