fix 'location list changed' verbose log not correctly listing changes

This commit is contained in:
Jesse Plamondon-Willard 2019-05-09 23:03:45 -04:00
parent 602c8d75db
commit e3a2c56a6d
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ These changes have not been released yet.
* For modders: * For modders:
* `this.Monitor.Log` now defaults to the `Trace` log level instead of `Debug`. * `this.Monitor.Log` now defaults to the `Trace` log level instead of `Debug`.
* Fixed 'location list changed' verbose log not correctly listing changes.
## 2.11.2 ## 2.11.2
Released 23 April 2019 for Stardew Valley 1.3.36. Released 23 April 2019 for Stardew Valley 1.3.36.

View File

@ -705,8 +705,8 @@ namespace StardewModdingAPI.Framework
if (this.Monitor.IsVerbose) if (this.Monitor.IsVerbose)
{ {
string addedText = this.Watchers.LocationsWatcher.Added.Any() ? string.Join(", ", added.Select(p => p.Name)) : "none"; string addedText = added.Any() ? string.Join(", ", added.Select(p => p.Name)) : "none";
string removedText = this.Watchers.LocationsWatcher.Removed.Any() ? string.Join(", ", removed.Select(p => p.Name)) : "none"; string removedText = removed.Any() ? string.Join(", ", removed.Select(p => p.Name)) : "none";
this.Monitor.Log($"Context: location list changed (added {addedText}; removed {removedText}).", LogLevel.Trace); this.Monitor.Log($"Context: location list changed (added {addedText}; removed {removedText}).", LogLevel.Trace);
} }