diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-06-27 11:22:36 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-06-27 11:22:36 -0400 |
commit | a9958dac6acd23213649456fe4763f54d2672bcb (patch) | |
tree | 304d15e7e8e08cd43d17eec05d2d23a50deddc95 /src/StardewModdingAPI | |
parent | f7f1b1e5137358b64254854df2cc34828004bd2a (diff) | |
download | SMAPI-a9958dac6acd23213649456fe4763f54d2672bcb.tar.gz SMAPI-a9958dac6acd23213649456fe4763f54d2672bcb.tar.bz2 SMAPI-a9958dac6acd23213649456fe4763f54d2672bcb.zip |
clean up log output when loading mods
Diffstat (limited to 'src/StardewModdingAPI')
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 9 |
1 files changed, 7 insertions, 2 deletions
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; } |