ModContent class for code/data generators that write files into a mod project's source code.
per output.
public abstract class ModSourceFileGenerator : BTD_Mod_Helper.Api.ModContent
Inheritance System.Object ModContent ModSourceFileGenerator
File extension to use
public virtual string FileExt { get; }
C# class name of the generated file (and its base filename).
public virtual string FileName { get; }
Multiple classes to generate, if applicable
public virtual System.Collections.Generic.IEnumerable<string> FileNames { get; }
System.Collections.Generic.IEnumerable<System.String>
Comment to include at the top of the file about it being a generated file
public virtual string GeneratedComment { get; }
C# namespace of the generated file.
public virtual string Namespace { get; }
Folder segments under the root project that the generated file lives in.
public abstract string[] OutputPath { get; }
<ModHelperSourceFolder>/BloonsTD6 Mod Helper — root for everything generators emit.
public virtual string RootFolder { get; }
Root Namespace for the class to be in before OutputPath
public virtual string RootNamespace { get; }
Build the file contents into a fresh System.Text.StringBuilder and write them to OutputPath/FileName.FileExt.
public virtual void Generate();
Append the file's contents to sb for the class
public virtual void Generate(System.Text.StringBuilder sb, ref string fileName);
fileName System.String
Append the file's contents to sb
public virtual void Generate(System.Text.StringBuilder sb);