Skip to content

Commit

Permalink
Small cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
Byte-Nova committed Dec 28, 2024
1 parent 630b560 commit fb48fef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
20 changes: 12 additions & 8 deletions Source/Client/Core/Preferences/UserLoginManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,12 @@ public static LoginDataFile LoadLoginData()
{
// For testing purposes

if (Input.GetKey(KeyCode.LeftShift))
if (Input.GetKey(KeyCode.LeftShift)) return GetTestingLoginFile();
else
{
LoginDataFile file = new LoginDataFile();
file.UID = "UID";
file.Username = "Username";
return file;
if (File.Exists(Master.loginDataPath)) return Serializer.SerializeFromFile<LoginDataFile>(Master.loginDataPath);
else return new LoginDataFile();
}

if (File.Exists(Master.loginDataPath)) return Serializer.SerializeFromFile<LoginDataFile>(Master.loginDataPath);
else return new LoginDataFile();
}

public static void DeleteLoginData() { File.Delete(Master.loginDataPath); }
Expand All @@ -55,6 +51,14 @@ public static void UseLoginData()
}
}

private static LoginDataFile GetTestingLoginFile()
{
LoginDataFile file = new LoginDataFile();
file.UID = "UID";
file.Username = "Username";
return file;
}

public static void PromptCreateAccount(bool isQuickConnect)
{
Action toDo = delegate
Expand Down
4 changes: 3 additions & 1 deletion Source/Shared/Misc/Attributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ namespace Shared
{
// Used for instantiating managers
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public class RTManager : Attribute {}
public class RTManager : Attribute { }

// Used for loading in custom assemblies
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public class RTStartupAttribute : Attribute { }
}

0 comments on commit fb48fef

Please sign in to comment.