This commit is contained in:
recroom2016
2022-02-18 18:47:45 -05:00
parent c457ad7ce6
commit 4fe1d5751f
3 changed files with 7 additions and 3 deletions

View File

@@ -207,9 +207,9 @@ namespace server
{ {
File.WriteAllText("SaveData\\avatar.txt", text); File.WriteAllText("SaveData\\avatar.txt", text);
} }
if (Url == "settings/v2") if (Url == "settings/v2/")
{ {
s = Settings.GetPlayerSettings();
} }
Console.WriteLine("API Response: " + s); Console.WriteLine("API Response: " + s);
byte[] bytes = Encoding.UTF8.GetBytes(s); byte[] bytes = Encoding.UTF8.GetBytes(s);

View File

@@ -175,6 +175,6 @@ namespace api
private static List<Setting> playerSettings; private static List<Setting> playerSettings;
// Token: 0x040000F1 RID: 241 // Token: 0x040000F1 RID: 241
public static string SettingsPath = + "PlayerSettings.dat"; public static string SettingsPath = "SaveData\\settings.txt";
} }
} }

View File

@@ -24,6 +24,10 @@ namespace start
{ {
File.WriteAllText("SaveData\\Profile\\username.txt", "DefaultUsername"); 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"))) if (!(File.Exists("SaveData\\profileimage.png")))
{ {
File.WriteAllBytes("SaveData\\profileimage.png", new WebClient().DownloadData("https://github.com/OpenRecRoom/OpenRec/raw/main/profileimage.png")); File.WriteAllBytes("SaveData\\profileimage.png", new WebClient().DownloadData("https://github.com/OpenRecRoom/OpenRec/raw/main/profileimage.png"));