Skip to content

Commit 977a0a0

Browse files
author
Mikkel Sørensen
committed
Simplified EditorData and removed unused fields
1 parent 7dc5320 commit 977a0a0

File tree

2 files changed

+27
-28
lines changed

2 files changed

+27
-28
lines changed

Runtime/Editor/LootLockerEditorData.cs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,80 +8,80 @@ public class LootLockerEditorData
88
{
99
private static string prefix = PlayerSettings.productGUID.ToString() + ".LootLocker.";
1010

11-
private static string adminToken = "AdminToken";
12-
private static string selectedGameID = "SelectedGameID";
13-
private static string selectedGameName = "SelectedGameName";
14-
private static string environment = "Environment";
15-
private static string firstTimeWelcome = "FirstTimeWelcome";
16-
private static string newSession = "NewSession";
11+
private static string adminToken = prefix + "AdminToken";
12+
private static string selectedGameID = prefix + "SelectedGameID";
13+
private static string selectedGameName = prefix + "SelectedGameName";
14+
private static string environment = prefix + "Environment";
15+
private static string firstTimeWelcome = prefix + "FirstTimeWelcome";
16+
private static string newSession = prefix + "NewSession";
1717

1818
public static void ClearLootLockerPrefs()
1919
{
20-
EditorPrefs.DeleteKey(prefix + adminToken);
21-
EditorPrefs.DeleteKey(prefix + selectedGameID);
22-
EditorPrefs.DeleteKey(prefix + selectedGameName);
23-
EditorPrefs.DeleteKey(prefix + environment);
24-
EditorPrefs.DeleteKey(prefix + firstTimeWelcome);
25-
EditorPrefs.DeleteKey(prefix + newSession);
20+
EditorPrefs.DeleteKey(adminToken);
21+
EditorPrefs.DeleteKey(selectedGameID);
22+
EditorPrefs.DeleteKey(selectedGameName);
23+
EditorPrefs.DeleteKey(environment);
24+
EditorPrefs.DeleteKey(firstTimeWelcome);
25+
EditorPrefs.DeleteKey(newSession);
2626
}
2727

2828
public static void SetAdminToken(string _adminToken)
2929
{
30-
EditorPrefs.SetString(prefix + adminToken, _adminToken);
31-
EditorPrefs.SetBool(prefix + firstTimeWelcome, false);
32-
EditorPrefs.SetBool(prefix + newSession, true);
30+
EditorPrefs.SetString(adminToken, _adminToken);
31+
EditorPrefs.SetBool(firstTimeWelcome, false);
32+
EditorPrefs.SetBool(newSession, true);
3333
}
3434

3535
public static string GetAdminToken()
3636
{
37-
return EditorPrefs.GetString(prefix + adminToken);
37+
return EditorPrefs.GetString(adminToken);
3838
}
3939

4040
public static void SetSelectedGame(string _selectedGame)
4141
{
42-
EditorPrefs.SetInt(prefix + selectedGameID, int.Parse(_selectedGame));
42+
EditorPrefs.SetInt(selectedGameID, int.Parse(_selectedGame));
4343
}
4444
public static void SetSelectedGameName(string _selectedGameName)
4545
{
46-
EditorPrefs.SetString(prefix + selectedGameName, _selectedGameName);
46+
EditorPrefs.SetString(selectedGameName, _selectedGameName);
4747
}
4848

4949
public static int GetSelectedGame()
5050
{
51-
return EditorPrefs.GetInt(prefix + selectedGameID);
51+
return EditorPrefs.GetInt(selectedGameID);
5252
}
5353

5454
public static string GetSelectedGameName()
5555
{
56-
return EditorPrefs.GetString(prefix + selectedGameName);
56+
return EditorPrefs.GetString(selectedGameName);
5757
}
5858

5959
public static void SetEnvironmentStage()
6060
{
61-
EditorPrefs.SetString(prefix + environment, "Stage");
61+
EditorPrefs.SetString(environment, "Stage");
6262
}
6363

6464
public static void SetEnvironmentLive()
6565
{
66-
EditorPrefs.SetString(prefix + environment, "Live");
66+
EditorPrefs.SetString(environment, "Live");
6767
}
6868

6969
public static bool IsEnvironmentStage()
7070
{
71-
return EditorPrefs.GetString(prefix + environment).Equals("Stage");
71+
return EditorPrefs.GetString(environment).Equals("Stage");
7272
}
7373

7474
public static bool ShouldAutoShowWindow()
7575
{
76-
var result = EditorPrefs.GetBool(prefix + firstTimeWelcome, true);
77-
EditorPrefs.SetBool(prefix + firstTimeWelcome, false);
76+
var result = EditorPrefs.GetBool(firstTimeWelcome, true);
77+
EditorPrefs.SetBool(firstTimeWelcome, false);
7878
return result;
7979
}
8080

8181
public static bool IsNewSession()
8282
{
83-
bool result = EditorPrefs.GetBool(prefix + newSession, false);
84-
EditorPrefs.SetBool(prefix + newSession, false);
83+
bool result = EditorPrefs.GetBool(newSession, false);
84+
EditorPrefs.SetBool(newSession, false);
8585
return result;
8686
}
8787
}

Runtime/Editor/LootLockerExtensionResponses.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public class User
6666
{
6767
public int id { get; set; }
6868
public string name { get; set; }
69-
//public string email { get; set; }
7069
public long signed_up { get; set; }
7170
public Organisation[] organisations { get; set; }
7271
private Dictionary<int, int> organisationIndexByID { get; set; }

0 commit comments

Comments
 (0)