This commit is contained in:
recroom2016
2022-02-18 18:15:24 -05:00
parent 710029aff5
commit c457ad7ce6
9 changed files with 641 additions and 39 deletions

35
Setup.cs Normal file
View File

@@ -0,0 +1,35 @@
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\\profileimage.png")))
{
File.WriteAllBytes("SaveData\\profileimage.png", new WebClient().DownloadData("https://github.com/OpenRecRoom/OpenRec/raw/main/profileimage.png"));
}
Console.WriteLine("Done!");
Console.Clear();
}
}
}