Tweaks to cfg comment formatting

This commit is contained in:
ManlyMarco committed 2019-08-17 01:43:58 +02:00
1 parent 095bdbece1
commit 2d81483670
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ namespace BepInEx.Configuration
/// </summary>
public string ToSerializedString()
{
return $"# {Description.Replace("\n", "\n# ")}";
return $"## {Description.Replace("\n", "\n## ")}";
}
}
}
+4 -4
View File
@@ -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)));
}
}