using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Net; namespace start { class Setup { public static void setup() { Console.WriteLine("Setting up..."); Directory.CreateDirectory("SaveData\\Profile\\"); if (!(File.Exists("SaveData\\avatar.txt"))) { File.WriteAllText("SaveData\\avatar.txt", new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/avatar.txt")); } else if (File.ReadAllText("SaveData\\avatar.txt") == "") { File.WriteAllText("SaveData\\avatar.txt", new WebClient().DownloadString("https://raw.githubusercontent.com/recroom2016/OpenRec/master/Download/avatar.txt")); } if (!(File.Exists("SaveData\\Profile\\username.txt"))) { File.WriteAllText("SaveData\\Profile\\username.txt", "DefaultUsername"); } if (!(File.Exists("SaveData\\settings.txt"))) { File.WriteAllText("SaveData\\settings.txt", Newtonsoft.Json.JsonConvert.SerializeObject(api.Settings.CreateDefaultSettings())); } if (!(File.Exists("SaveData\\profileimage.png"))) { File.WriteAllBytes("SaveData\\profileimage.png", new WebClient().DownloadData("https://github.com/OpenRecRoom/OpenRec/raw/main/profileimage.png")); } Console.WriteLine("Done!"); Console.Clear(); } } }