aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Objects/Save.cs
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-05-21 13:06:34 +0000
committerMichael VanOverbeek <[email protected]>2017-05-21 13:06:34 +0000
commit73fddd72636d5e95decccb431577911a4b509387 (patch)
tree03efe0afa49b714e0ed7c91213c0f7ef1ee320ac /ShiftOS.Objects/Save.cs
parent68785f73f027b9dd4555b9f1ab7a22a1ca8794f8 (diff)
parent6eb764bd5c1342fc7d3d6f2bd46069462b2a48db (diff)
downloadshiftos_thereturn-73fddd72636d5e95decccb431577911a4b509387.tar.gz
shiftos_thereturn-73fddd72636d5e95decccb431577911a4b509387.tar.bz2
shiftos_thereturn-73fddd72636d5e95decccb431577911a4b509387.zip
Merge branch 'master' of https://github.com/shiftos-game/ShiftOS
Diffstat (limited to 'ShiftOS.Objects/Save.cs')
-rw-r--r--ShiftOS.Objects/Save.cs27
1 files changed, 26 insertions, 1 deletions
diff --git a/ShiftOS.Objects/Save.cs b/ShiftOS.Objects/Save.cs
index cc19c79..f4e1e09 100644
--- a/ShiftOS.Objects/Save.cs
+++ b/ShiftOS.Objects/Save.cs
@@ -41,8 +41,33 @@ namespace ShiftOS.Objects
[Obsolete("This save variable is no longer used in Beta 2.4 and above of ShiftOS. Please use ShiftOS.Engine.SaveSystem.CurrentUser.Username to access the current user's username.")]
public string Username { get; set; }
+ private long _cp = 0;
+
+ public long Codepoints
+ {
+ get
+ {
+ if (!string.IsNullOrWhiteSpace(UniteAuthToken))
+ {
+ var uc = new ShiftOS.Unite.UniteClient("", UniteAuthToken);
+ return uc.GetCodepoints();
+ }
+ else
+ return _cp;
+ }
+ set
+ {
+ if (!string.IsNullOrWhiteSpace(UniteAuthToken))
+ {
+ var uc = new ShiftOS.Unite.UniteClient("", UniteAuthToken);
+ uc.SetCodepoints(value);
+ }
+ else
+ _cp = value;
+
+ }
+ }
- public long Codepoints { get; set; }
public Dictionary<string, bool> Upgrades { get; set; }
public int StoryPosition { get; set; }
public string Language { get; set; }