mirror of
https://github.com/recroom2016/OpenRec.git
synced 2026-04-22 13:25:51 +00:00
openrec
This commit is contained in:
35
Setup.cs
Normal file
35
Setup.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user