minor updates (#638)

This commit is contained in:
Jesse Plamondon-Willard 2019-11-18 21:07:52 -05:00
parent 3d4276707b
commit f154c5774d
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
2 changed files with 1 additions and 9 deletions

View File

@ -96,12 +96,6 @@ namespace StardewModdingAPI.Framework
new Regex(@"^DebugOutput:\s+(?:added CLOUD|added cricket|dismount tile|Ping|playerPos)", RegexOptions.Compiled | RegexOptions.CultureInvariant)
};
/// <summary>Regex patterns which match console error messages to suppress from the console and log.</summary>
private readonly Regex[] SuppressConsoleErrorPatterns =
{
new Regex(@"^Error loading schedule data for (?:Bouncer|Dwarf|Gunther|Henchman|Krobus|Marlon|Mister Qi|Sandy|Wizard): .+ ---> System\.IO\.FileNotFoundException", RegexOptions.Compiled | RegexOptions.CultureInvariant)
};
/// <summary>Regex patterns which match console messages to show a more friendly error for.</summary>
private readonly Tuple<Regex, string, LogLevel>[] ReplaceConsolePatterns =
{
@ -1321,8 +1315,6 @@ namespace StardewModdingAPI.Framework
// ignore suppressed message
if (level != LogLevel.Error && this.SuppressConsolePatterns.Any(p => p.IsMatch(message)))
return;
if (level == LogLevel.Error && this.SuppressConsoleErrorPatterns.Any(p => p.IsMatch(message)))
return;
// show friendly error if applicable
foreach (var entry in this.ReplaceConsolePatterns)

View File

@ -735,7 +735,7 @@ namespace StardewModdingAPI.Metadata
{
Lazy<Texture2D> texture = new Lazy<Texture2D>(() => content.Load<Texture2D>(key));
foreach (Tree tree in trees)
this.Reflection.GetField<Lazy<Texture2D>>(tree, "texture").SetValue(texture);
tree.texture = texture;
return true;
}