Program: Save override phases to BYAML

For debugging purposes, just in case.
This commit is contained in:
OatmealDome 2024-08-11 13:59:22 -04:00
parent 6297c86fe0
commit 700ecb78ff
2 changed files with 18 additions and 1 deletions

View File

@ -25,4 +25,15 @@ public class OverridePhase
get;
set;
}
public Dictionary<string, dynamic> ToByamlCompatibleFormat()
{
return new Dictionary<string, dynamic>()
{
{ "Length", Length },
{ "RegularStages", RegularStages },
{ "GachiRule", GachiRule.ToEnumString() },
{ "GachiStages", GachiStages }
};
}
}

View File

@ -302,7 +302,13 @@ void Run(InvocationContext context)
{ "Generator", "Rotationator 1" },
{ "GenerationTime", referenceNow.ToString("O") },
{ "BaseByamlStartTime", baseTime.ToString("O") },
{ "RandomSeed", seed.ToString() }
{ "RandomSeed", seed.ToString() },
{
"OverridePhases",
overridePhases.Select(p =>
new KeyValuePair<string, dynamic>(p.Key.ToString("O"), p.Value.ToByamlCompatibleFormat()))
.ToDictionary()
}
};
ByamlFile.Save(outputByamlPath, lastByaml, new ByamlSerializerSettings()