Enable comment and whitespace parsing where it is useful.
This commit is contained in:
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
foreach (var filename in modData.Manifest.ChromeLayout)
|
||||
{
|
||||
Console.WriteLine("# {0}:", filename);
|
||||
var yaml = MiniYaml.FromFile(filename);
|
||||
var yaml = MiniYaml.FromFile(filename, false);
|
||||
FromChromeLayout(ref yaml, null,
|
||||
translatableFields.Select(t => t.Name).Distinct(), null);
|
||||
using (var file = new StreamWriter(filename))
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
include |= map.Package.Contains(f);
|
||||
if (include)
|
||||
nodes.AddRange(MiniYaml.FromStream(map.Open(f), f));
|
||||
nodes.AddRange(MiniYaml.FromStream(map.Open(f), f, false));
|
||||
else
|
||||
includes.Add(f);
|
||||
}
|
||||
|
||||
@@ -62,8 +62,6 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
if (!args.Contains("--yes"))
|
||||
{
|
||||
Console.WriteLine("WARNING: This command will automatically rewrite your mod rules.");
|
||||
Console.WriteLine("Side effects of this command may include changing the whitespace to ");
|
||||
Console.WriteLine("match the default conventions, and any yaml comments will be removed.");
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("We strongly recommend that you have a backup of your mod rules, and ");
|
||||
Console.WriteLine("for best results, to use a Git client to review the line-by-line ");
|
||||
|
||||
Reference in New Issue
Block a user