mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Tweaks to cfg comment formatting
This commit is contained in:
1 parent
095bdbece1
commit
2d81483670
2 files changed
+5
-5
No files matched your search
@@ -40,7 +40,7 @@ namespace BepInEx.Configuration
|
||||
/// </summary>
|
||||
public string ToSerializedString()
|
||||
{
|
||||
return $"# {Description.Replace("\n", "\n# ")}";
|
||||
return $"## {Description.Replace("\n", "\n## ")}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -220,11 +220,11 @@ namespace BepInEx.Configuration
|
||||
|
||||
if (hasType)
|
||||
{
|
||||
writer.WriteLine("# Setting type: " + SettingType.Name);
|
||||
|
||||
if (SettingType.IsEnum && SettingType.GetCustomAttributes(typeof(FlagsAttribute), true).Any())
|
||||
writer.WriteLine("# Multiple values can be set at the same time by separating them with , (e.g. Debug, Warning)");
|
||||
|
||||
writer.WriteLine("# Setting type: " + SettingType.Name);
|
||||
|
||||
writer.WriteLine("# Default value: " + DefaultValue);
|
||||
}
|
||||
|
||||
@@ -236,9 +236,9 @@ namespace BepInEx.Configuration
|
||||
}
|
||||
else if (hasType)
|
||||
{
|
||||
if (SettingType == typeof(bool))
|
||||
/*if (SettingType == typeof(bool))
|
||||
writer.WriteLine("# Acceptable values: True, False");
|
||||
else if (SettingType.IsEnum)
|
||||
else*/ if (SettingType.IsEnum)
|
||||
writer.WriteLine("# Acceptable values: " + string.Join(", ", Enum.GetNames(SettingType)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user