fix log parser content pack list entry pattern, remove unneeded ternary in content pack logging
This commit is contained in:
parent
9ea2599356
commit
360a982336
|
@ -37,7 +37,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
|
|||
private readonly Regex ContentPackListStartPattern = new Regex(@"^Loaded \d+ content packs:$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
/// <summary>A regex pattern matching an entry in SMAPI's content pack list.</summary>
|
||||
private readonly Regex ContentPackListEntryPattern = new Regex(@"^ (?<name>.+) (?<version>.+) by (?<author>.+) \| for (?<for>.+?)(?: \| (?<description>.+))?$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
private readonly Regex ContentPackListEntryPattern = new Regex(@"^ (?<name>.+?) (?<version>" + SemanticVersion.UnboundedVersionPattern + @")(?: by (?<author>[^\|]+))? \| for (?<for>[^\|]+)(?: \| (?<description>.+))?$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
||||
/// <summary>A regex pattern matching the start of SMAPI's mod update list.</summary>
|
||||
private readonly Regex ModUpdateListStartPattern = new Regex(@"^You can update \d+ mods?:$", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
|
|
|
@ -783,7 +783,7 @@ namespace StardewModdingAPI.Framework
|
|||
this.Monitor.Log(
|
||||
$" {metadata.DisplayName} {manifest.Version}"
|
||||
+ (!string.IsNullOrWhiteSpace(manifest.Author) ? $" by {manifest.Author}" : "")
|
||||
+ (metadata.IsContentPack ? $" | for {GetModDisplayName(metadata.Manifest.ContentPackFor.UniqueID)}" : "")
|
||||
+ $" | for {GetModDisplayName(metadata.Manifest.ContentPackFor.UniqueID)}"
|
||||
+ (!string.IsNullOrWhiteSpace(manifest.Description) ? $" | {manifest.Description}" : ""),
|
||||
LogLevel.Info
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue