Skip to content

Commit 5d04709

Browse files
Update DocsProvider.cs
1 parent 2862372 commit 5d04709

File tree

1 file changed

+0
-66
lines changed

1 file changed

+0
-66
lines changed

Code/Plugin/Commands/HelpSystem/DocsProvider.cs

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -576,70 +576,4 @@ public static string GetPlayerInfoAccessorsHelpPage()
576576
{{sb}}
577577
""";
578578
}
579-
580-
public static string GenerateAllDocumentationToJson()
581-
{
582-
JObject main = new();
583-
584-
JObject jMethods = new();
585-
foreach (var (category, methods) in MethodsByCategory())
586-
{
587-
var jMethodList = new JObject();
588-
foreach (var method in methods)
589-
{
590-
jMethodList[method.Name] = GetMethodHelp(method);
591-
}
592-
593-
jMethods[$"{category} category"] = jMethodList;
594-
}
595-
596-
main["methods"] = jMethods;
597-
598-
JObject jEnums = new();
599-
foreach (var enumType in HelpInfoStorage.UsedEnums)
600-
{
601-
jEnums[enumType.Name] = GetEnum(enumType);
602-
}
603-
604-
main["enums"] = jEnums;
605-
606-
JObject jEvents = new();
607-
foreach (var evnt in EventSystem.EventHandler.AvailableEvents)
608-
{
609-
jEvents[evnt.Name] = GetEventInfo(evnt);
610-
}
611-
612-
main["event info"] = jEvents;
613-
614-
main["event list"] = GetEventsHelpPage();
615-
616-
main["ref res methods"] = GetReferenceResolvingMethodsHelpPage();
617-
618-
main["plr info access"] = GetPlayerInfoAccessorsHelpPage();
619-
620-
main["keyword list"] = GetKeywordHelpPage();
621-
622-
JObject jKeywords = new();
623-
foreach (var keyword in KeywordToken.KeywordContexts)
624-
{
625-
jKeywords[keyword.KeywordName] = GetKeywordInfo(
626-
keyword.KeywordName,
627-
keyword.Description,
628-
keyword.Arguments,
629-
keyword is StatementContext,
630-
keyword.GetType()
631-
);
632-
}
633-
634-
main["keyword help"] = jKeywords;
635-
636-
main["flags"] = GetFlagHelpPage();
637-
638-
main["variable list"] = GetVariableList();
639-
640-
var path = Path.Combine(FileSystem.FileSystem.MainDirPath, "documentation.json");
641-
using var file = File.CreateText(path);
642-
file.Write(main.ToString(Formatting.Indented));
643-
return $"Created documentation file at {path}!";
644-
}
645579
}

0 commit comments

Comments
 (0)