This commit is contained in:
h z
2024-07-12 14:32:16 +01:00
parent 3699cb3383
commit 6f05d251cf

View File

@@ -25,13 +25,14 @@ public class DataTypeGenerator : ISourceGenerator
if (types == null) if (types == null)
return; return;
StringBuilder sb = new(); StringBuilder sb = new();
sb.AppendLine("using Godot;"); sb
sb.AppendLine("using Nocturnis.DataStructures.DataTypes;"); .AppendLine("using Godot;")
sb.AppendLine("namespace Nocturnis.GlobalManagement.Constants;"); .AppendLine("using Nocturnis.DataStructures.DataTypes;")
sb.AppendLine("public static partial class DataTypeConstant"); .AppendLine("namespace Nocturnis.GlobalManagement.Constants;")
sb.AppendLine("{"); .AppendLine("public static partial class DataTypeConstant")
sb.AppendLine(" public static class BaseDataTypeNames"); .AppendLine("{")
sb.AppendLine(" {"); .AppendLine(" public static class BaseDataTypeNames")
.AppendLine(" {");
StringBuilder sxa = new(); StringBuilder sxa = new();
foreach (string? type in types) foreach (string? type in types)
{ {
@@ -49,4 +50,4 @@ public class DataTypeGenerator : ISourceGenerator
context.AddSource("DataTypeConstant.g.cs", SourceText.From(sb.ToString(), Encoding.UTF8)); context.AddSource("DataTypeConstant.g.cs", SourceText.From(sb.ToString(), Encoding.UTF8));
} }
} }
} }