From 3078ae2a8e10294c86f8702769e15da16511ecde Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 13 Apr 2022 22:17:26 -0400 Subject: [PATCH] fix typos in recent changes (#837) --- src/SMAPI/Framework/Logging/LogManager.cs | 8 ++++---- src/SMAPI/Framework/Reflection/Reflector.cs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/SMAPI/Framework/Logging/LogManager.cs b/src/SMAPI/Framework/Logging/LogManager.cs index a5989673..b94807b5 100644 --- a/src/SMAPI/Framework/Logging/LogManager.cs +++ b/src/SMAPI/Framework/Logging/LogManager.cs @@ -93,18 +93,18 @@ namespace StardewModdingAPI.Framework.Logging /// Get the screen ID that should be logged to distinguish between players in split-screen mode, if any. public LogManager(string logPath, ColorSchemeConfig colorConfig, bool writeToConsole, bool isVerbose, bool isDeveloperMode, Func getScreenIdForLog) { - // init fields + // init log file this.LogFile = new LogFileManager(logPath); - this.Monitor = this.GetMonitor("SMAPI"); - this.MonitorForGame = this.GetMonitor("game"); - // init construction logic + // init monitor this.GetMonitorImpl = name => new Monitor(name, LogManager.IgnoreChar, this.LogFile, colorConfig, isVerbose, getScreenIdForLog) { WriteToConsole = writeToConsole, ShowTraceInConsole = isDeveloperMode, ShowFullStampInConsole = isDeveloperMode }; + this.Monitor = this.GetMonitor("SMAPI"); + this.MonitorForGame = this.GetMonitor("game"); // redirect direct console output this.ConsoleInterceptor = new InterceptingTextWriter( diff --git a/src/SMAPI/Framework/Reflection/Reflector.cs b/src/SMAPI/Framework/Reflection/Reflector.cs index 3490ee97..79575c26 100644 --- a/src/SMAPI/Framework/Reflection/Reflector.cs +++ b/src/SMAPI/Framework/Reflection/Reflector.cs @@ -153,7 +153,7 @@ namespace StardewModdingAPI.Framework.Reflection { for (Type? curType = type; curType != null; curType = curType.BaseType) { - FieldInfo? fieldInfo = type.GetField(name, bindingFlags); + FieldInfo? fieldInfo = curType.GetField(name, bindingFlags); if (fieldInfo != null) { type = curType; @@ -182,7 +182,7 @@ namespace StardewModdingAPI.Framework.Reflection { for (Type? curType = type; curType != null; curType = curType.BaseType) { - PropertyInfo? propertyInfo = type.GetProperty(name, bindingFlags); + PropertyInfo? propertyInfo = curType.GetProperty(name, bindingFlags); if (propertyInfo != null) { type = curType; @@ -210,7 +210,7 @@ namespace StardewModdingAPI.Framework.Reflection { for (Type? curType = type; curType != null; curType = curType.BaseType) { - MethodInfo? methodInfo = type.GetMethod(name, bindingFlags); + MethodInfo? methodInfo = curType.GetMethod(name, bindingFlags); if (methodInfo != null) { type = curType;