Allow specifying realm when generating docs for a single type and added PlayerInput to docs

This commit is contained in:
EvilFactory
2023-03-18 15:43:10 -03:00
parent 6974c5338a
commit 64215c5722
3 changed files with 15 additions and 6 deletions

View File

@@ -483,7 +483,7 @@ local {type.Name} = {{}}".ReplaceLineEndings("\n");
return baseLuaText;
}
public static void GenerateDocs(Type type, string baseFile, string outFile, string? categoryName = null)
public static void GenerateDocs(Type type, string baseFile, string outFile, string? categoryName = null, string realm = "shared")
{
categoryName ??= type.Name;
var sb = new StringBuilder();
@@ -503,21 +503,21 @@ local {type.Name} = {{}}".ReplaceLineEndings("\n");
{
case MemberTypes.Method:
{
sb.Append(ConvertAnnotation(type, (MethodInfo)member, "shared"));
sb.Append(ConvertAnnotation(type, (MethodInfo)member, realm));
sb.AppendLine();
break;
}
case MemberTypes.Field:
{
sb.Append(ConvertAnnotation(type, (FieldInfo)member, "shared"));
sb.Append(ConvertAnnotation(type, (FieldInfo)member, realm));
sb.AppendLine();
break;
}
case MemberTypes.Property:
{
sb.Append(ConvertAnnotation(type, (PropertyInfo)member, "shared"));
sb.Append(ConvertAnnotation(type, (PropertyInfo)member, realm));
sb.AppendLine();
break;
}