Browse Source

Change AddSetting calls to new shorter overload

ManlyMarco 5 years ago
parent
commit
8098324fec

+ 3 - 3
BepInEx.Preloader/Patching/AssemblyPatcher.cs

@@ -280,17 +280,17 @@ namespace BepInEx.Preloader.Patching
 		private static readonly ConfigEntry<bool> ConfigDumpAssemblies = ConfigFile.CoreConfig.AddSetting(
 			"Preloader", "DumpAssemblies",
 			false,
-			new ConfigDescription("If enabled, BepInEx will save patched assemblies into BepInEx/DumpedAssemblies.\nThis can be used by developers to inspect and debug preloader patchers."));
+			"If enabled, BepInEx will save patched assemblies into BepInEx/DumpedAssemblies.\nThis can be used by developers to inspect and debug preloader patchers.");
 
 		private static readonly ConfigEntry<bool> ConfigLoadDumpedAssemblies = ConfigFile.CoreConfig.AddSetting(
 			"Preloader", "LoadDumpedAssemblies",
 			false,
-			new ConfigDescription("If enabled, BepInEx will load patched assemblies from BepInEx/DumpedAssemblies instead of memory.\nThis can be used to be able to load patched assemblies into debuggers like dnSpy.\nIf set to true, will override DumpAssemblies."));
+			"If enabled, BepInEx will load patched assemblies from BepInEx/DumpedAssemblies instead of memory.\nThis can be used to be able to load patched assemblies into debuggers like dnSpy.\nIf set to true, will override DumpAssemblies.");
 
 		private static readonly ConfigEntry<bool> ConfigBreakBeforeLoadAssemblies = ConfigFile.CoreConfig.AddSetting(
 			"Preloader", "BreakBeforeLoadAssemblies",
 			false,
-			new ConfigDescription("If enabled, BepInEx will call Debugger.Break() once before loading patched assemblies.\nThis can be used with debuggers like dnSpy to install breakpoints into patched assemblies before they are loaded."));
+			"If enabled, BepInEx will call Debugger.Break() once before loading patched assemblies.\nThis can be used with debuggers like dnSpy to install breakpoints into patched assemblies before they are loaded.");
 
 		#endregion
 	}

+ 6 - 6
BepInEx.Preloader/Preloader.cs

@@ -240,32 +240,32 @@ namespace BepInEx.Preloader
 		private static readonly ConfigEntry<string> ConfigEntrypointAssembly = ConfigFile.CoreConfig.AddSetting(
 			"Preloader.Entrypoint", "Assembly",
 			IsPostUnity2017 ? "UnityEngine.CoreModule.dll" : "UnityEngine.dll",
-			new ConfigDescription("The local filename of the assembly to target."));
+			"The local filename of the assembly to target.");
 
 		private static readonly ConfigEntry<string> ConfigEntrypointType = ConfigFile.CoreConfig.AddSetting(
 			"Preloader.Entrypoint", "Type",
 			"Application",
-			new ConfigDescription("The name of the type in the entrypoint assembly to search for the entrypoint method."));
+			"The name of the type in the entrypoint assembly to search for the entrypoint method.");
 
 		private static readonly ConfigEntry<string> ConfigEntrypointMethod = ConfigFile.CoreConfig.AddSetting(
 			"Preloader.Entrypoint", "Method",
 			".cctor",
-			new ConfigDescription("The name of the method in the specified entrypoint assembly and type to hook and load Chainloader from."));
+			"The name of the method in the specified entrypoint assembly and type to hook and load Chainloader from.");
 
 		private static readonly ConfigEntry<bool> ConfigApplyRuntimePatches = ConfigFile.CoreConfig.AddSetting(
 			"Preloader", "ApplyRuntimePatches",
 			true,
-			new ConfigDescription("Enables or disables runtime patches.\nThis should always be true, unless you cannot start the game due to a Harmony related issue (such as running .NET Standard runtime) or you know what you're doing."));
+			"Enables or disables runtime patches.\nThis should always be true, unless you cannot start the game due to a Harmony related issue (such as running .NET Standard runtime) or you know what you're doing.");
 
 		private static readonly ConfigEntry<bool> ConfigShimHarmony = ConfigFile.CoreConfig.AddSetting(
 			"Preloader", "ShimHarmonySupport",
 			!Utility.CLRSupportsDynamicAssemblies,
-			new ConfigDescription("If enabled, basic Harmony functionality is patched to use MonoMod's RuntimeDetour instead.\nTry using this if Harmony does not work in a game."));
+			"If enabled, basic Harmony functionality is patched to use MonoMod's RuntimeDetour instead.\nTry using this if Harmony does not work in a game.");
 
 		private static readonly ConfigEntry<bool> ConfigPreloaderCOutLogging = ConfigFile.CoreConfig.AddSetting(
 			"Logging", "PreloaderConsoleOutRedirection",
 			true,
-			new ConfigDescription("Redirects text from Console.Out during preloader patch loading to the BepInEx logging system."));
+			"Redirects text from Console.Out during preloader patch loading to the BepInEx logging system.");
 
 		#endregion
 	}

+ 5 - 5
BepInEx/Bootstrap/Chainloader.cs

@@ -337,27 +337,27 @@ namespace BepInEx.Bootstrap
 		private static readonly ConfigEntry<bool> ConfigUnityLogging = ConfigFile.CoreConfig.AddSetting(
 			"Logging", "UnityLogListening",
 			true,
-			new ConfigDescription("Enables showing unity log messages in the BepInEx logging system."));
+			"Enables showing unity log messages in the BepInEx logging system.");
 
 		private static readonly ConfigEntry<bool> ConfigDiskWriteUnityLog = ConfigFile.CoreConfig.AddSetting(
 			"Logging.Disk", "WriteUnityLog",
 			false,
-			new ConfigDescription("Include unity log messages in log file output."));
+			"Include unity log messages in log file output.");
 
 		private static readonly ConfigEntry<bool> ConfigDiskAppend = ConfigFile.CoreConfig.AddSetting(
 			"Logging.Disk", "AppendLog",
 			false,
-			new ConfigDescription("Appends to the log file instead of overwriting, on game startup."));
+			"Appends to the log file instead of overwriting, on game startup.");
 
 		private static readonly ConfigEntry<bool> ConfigDiskLogging = ConfigFile.CoreConfig.AddSetting(
 			"Logging.Disk", "Enabled",
 			true,
-			new ConfigDescription("Enables writing log messages to disk."));
+			"Enables writing log messages to disk.");
 
 		private static readonly ConfigEntry<LogLevel> ConfigDiskConsoleDisplayedLevel = ConfigFile.CoreConfig.AddSetting(
 			"Logging.Disk", "DisplayedLogLevel",
 			LogLevel.Info,
-			new ConfigDescription("Only displays the specified log level and above in the console output."));
+			"Only displays the specified log level and above in the console output.");
 		#endregion
 	}
 }

+ 1 - 1
BepInEx/Bootstrap/TypeLoader.cs

@@ -260,7 +260,7 @@ namespace BepInEx.Bootstrap
 		private static readonly ConfigEntry<bool> EnableAssemblyCache = ConfigFile.CoreConfig.AddSetting(
 			"Caching", "EnableAssemblyCache", 
 			true, 
-			new ConfigDescription("Enable/disable assembly metadata cache\nEnabling this will speed up discovery of plugins and patchers by caching the metadata of all types BepInEx discovers."));
+			"Enable/disable assembly metadata cache\nEnabling this will speed up discovery of plugins and patchers by caching the metadata of all types BepInEx discovers.");
 
 		#endregion
 	}

+ 2 - 2
BepInEx/ConsoleUtil/ConsoleWindow.cs

@@ -16,12 +16,12 @@ namespace UnityInjector.ConsoleUtil
 		public static readonly ConfigEntry<bool> ConfigConsoleEnabled = ConfigFile.CoreConfig.AddSetting(
 			"Logging.Console", "Enabled",
 			false,
-			new ConfigDescription("Enables showing a console for log output."));
+			"Enables showing a console for log output.");
 
 		public static readonly ConfigEntry<bool> ConfigConsoleShiftJis = ConfigFile.CoreConfig.AddSetting(
 			"Logging.Console", "ShiftJisEncoding",
 			false,
-			new ConfigDescription("If true, console is set to the Shift-JIS encoding, otherwise UTF-8 encoding."));
+			"If true, console is set to the Shift-JIS encoding, otherwise UTF-8 encoding.");
 
 		public static bool IsAttached { get; private set; }
 		private static IntPtr _cOut;

+ 1 - 1
BepInEx/Logging/ConsoleLogListener.cs

@@ -26,6 +26,6 @@ namespace BepInEx.Logging
 		private static readonly ConfigEntry<LogLevel> ConfigConsoleDisplayedLevel = ConfigFile.CoreConfig.AddSetting(
 			"Logging.Console","DisplayedLogLevel",
 			LogLevel.Info,
-			new ConfigDescription("Only displays the specified log level and above in the console output."));
+			"Only displays the specified log level and above in the console output.");
 	}
 }