diff options
-rw-r--r-- | release-notes.md | 4 | ||||
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/release-notes.md b/release-notes.md index e5cfb7f8..c76623b0 100644 --- a/release-notes.md +++ b/release-notes.md @@ -17,12 +17,12 @@ See [log](https://github.com/Pathoschild/SMAPI/compare/1.14...1.15). For players: * SMAPI will no longer load mods known to be obsolete or unneeded. * When the `ObjectInformation.xnb` is broken, SMAPI will now print one error to the console instead of a warning flood. (The individual issues are still listed in the log file if needed.) -* Mods are now listed in alphabetical order in the log. +* Cleaned up & sorted mod list in console log. For modders: * You can now specify minimum dependency versions in `manifest.json`. * Added `System.ValueTuple.dll` to the SMAPI install package so mods can use [C# 7 value tuples](https://docs.microsoft.com/en-us/dotnet/csharp/tuples). -* Improved trace logging when SMAPI loads mods. +* Cleaned up SMAPI logging when loading mods. * Changed `manifest.MinimumApiVersion` from string to `ISemanticVersion`. * Fixed `SemanticVersion` parsing some invalid versions into close approximations (like `1.apple` → `1.0-apple`). * Fixed `SemanticVersion` not treating hyphens as separators when comparing prerelease tags. diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index 0805b6c5..f313a9ac 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -668,10 +668,16 @@ namespace StardewModdingAPI } // log mods + this.Monitor.Log($"Loaded {modsLoaded} mods" + (modsLoaded > 0 ? ":" : "."), LogLevel.Info); foreach (var metadata in this.ModRegistry.GetMods().OrderBy(p => p.DisplayName)) { IManifest manifest = metadata.Manifest; - this.Monitor.Log($"Loaded {metadata.DisplayName} by {manifest.Author}, v{manifest.Version} | {manifest.Description}", LogLevel.Info); + this.Monitor.Log( + $" {metadata.DisplayName} {manifest.Version}" + + (!string.IsNullOrWhiteSpace(manifest.Author) ? $" by {manifest.Author}" : "") + + (!string.IsNullOrWhiteSpace(manifest.Description) ? $" | {manifest.Description}" : ""), + LogLevel.Info + ); } // initialise translations @@ -699,7 +705,6 @@ namespace StardewModdingAPI } // print result - this.Monitor.Log($"Loaded {modsLoaded} mods."); return modsLoaded; } |