public static Wiki GetWiki()
        {
            try
            {
                if (gotWiki)
                {
                    return(wiki);
                }
                gotWiki = true;

                HtmlDocument htmlDoc = new HtmlDocument();
                htmlDoc.OptionFixNestedTags = true;

                using (var webClient = new WebClient())
                    htmlDoc.Load(webClient.OpenRead(URL), Encoding.UTF8);

                List <WikiMethod> methods = new List <WikiMethod>();

                // Loop through all summaries
                foreach (var summary in htmlDoc.DocumentNode.Descendants("summary"))
                {
                    string name = summary.InnerText.Trim(); // Gets the name

                    // Sometimes methods have "- New!" at the end, be sure to remove it.
                    if (name.EndsWith("- New!"))
                    {
                        name = name.Substring(0, name.Length - "- New!".Length).Trim();
                    }

                    var    details     = summary.ParentNode;
                    string description = details.SelectNodes("p").First().InnerText.Trim(); // Gets the description.

                    // Get the parameters.
                    List <WikiParameter> parameters = new List <WikiParameter>();
                    var parameterSummaries          = details.SelectSingleNode("ul")?.SelectNodes("li"); // 'ul' being list and 'li' being list element.
                    if (parameterSummaries != null)
                    {
                        foreach (var parameterSummary in parameterSummaries)
                        {
                            string[] data = parameterSummary.InnerText.Split(new char[] { '-' }, 2);
                            parameters.Add(new WikiParameter(data[0].Trim(), data.ElementAtOrDefault(1)?.Trim()));
                        }
                    }

                    methods.Add(new WikiMethod(name, description, parameters.ToArray()));
                }

                wiki = new Wiki(methods.ToArray());
                return(wiki);
            }
            catch (Exception ex)
            {
                Log.Write(LogLevel.Normal, "Failed to load Workshop Wiki: ", new ColorMod(ex.Message, ConsoleColor.Red));
                return(null);
            }
        }
        public static Wiki GetWiki()
        {
            if (wiki == null)
            {
                try
                {
                    string        languageFile = Path.Combine(Program.ExeFolder, "Wiki.xml");
                    XmlSerializer serializer   = new XmlSerializer(typeof(Wiki));

                    using (var fileStream = File.OpenRead(languageFile))
                        wiki = (Wiki)serializer.Deserialize(fileStream);
                }
                catch (Exception ex)
                {
                    Log.Write(LogLevel.Normal, "Failed to load Workshop Wiki: ", new ColorMod(ex.Message, ConsoleColor.Red));
                }
            }
            return(wiki);
        }