mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Reduce redundancy in schema generation code
This commit is contained in:
parent
d69c6b117c
commit
031e8b99bb
@ -22,14 +22,11 @@ public static class SchemaExporter
|
|||||||
FlattenInheritanceHierarchy = true,
|
FlattenInheritanceHierarchy = true,
|
||||||
AllowReferencesWithProperties = true
|
AllowReferencesWithProperties = true
|
||||||
};
|
};
|
||||||
Console.WriteLine("Outputting Body Schema");
|
|
||||||
var bodySchema = new Schema<PlanetConfig>("Celestial Body Schema", $"{folderName}/body_schema", settings);
|
var bodySchema = new Schema<PlanetConfig>("Celestial Body Schema", $"{folderName}/body_schema", settings);
|
||||||
bodySchema.Output();
|
bodySchema.Output();
|
||||||
Console.WriteLine("Outputting Star System Schema");
|
|
||||||
var systemSchema =
|
var systemSchema =
|
||||||
new Schema<StarSystemConfig>("Star System Schema", $"{folderName}/star_system_schema", settings);
|
new Schema<StarSystemConfig>("Star System Schema", $"{folderName}/star_system_schema", settings);
|
||||||
systemSchema.Output();
|
systemSchema.Output();
|
||||||
Console.WriteLine("Outputting Translation Schema");
|
|
||||||
var translationSchema =
|
var translationSchema =
|
||||||
new Schema<TranslationConfig>("Translation Schema", $"{folderName}/translation_schema", settings);
|
new Schema<TranslationConfig>("Translation Schema", $"{folderName}/translation_schema", settings);
|
||||||
translationSchema.Output();
|
translationSchema.Output();
|
||||||
@ -51,6 +48,7 @@ public static class SchemaExporter
|
|||||||
|
|
||||||
public void Output()
|
public void Output()
|
||||||
{
|
{
|
||||||
|
Console.WriteLine($"Outputting {_title}");
|
||||||
File.WriteAllText($"{_outFileName}.json", ToString());
|
File.WriteAllText($"{_outFileName}.json", ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user