aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShiftOS.Objects/Save.cs27
-rw-r--r--ShiftOS.Objects/ShiftOS.Objects.csproj1
-rw-r--r--ShiftOS.Objects/UniteClient.cs (renamed from ShiftOS_TheReturn/UniteClient.cs)0
-rw-r--r--ShiftOS_TheReturn/ShiftOS.Engine.csproj1
4 files changed, 27 insertions, 2 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; }
diff --git a/ShiftOS.Objects/ShiftOS.Objects.csproj b/ShiftOS.Objects/ShiftOS.Objects.csproj
index c2ef5ed..3c36d8c 100644
--- a/ShiftOS.Objects/ShiftOS.Objects.csproj
+++ b/ShiftOS.Objects/ShiftOS.Objects.csproj
@@ -56,6 +56,7 @@
<Compile Include="Save.cs" />
<Compile Include="ShiftFS.cs" />
<Compile Include="Shop.cs" />
+ <Compile Include="UniteClient.cs" />
<Compile Include="Unite\Download.cs" />
<Compile Include="Unite\ReleaseQuery.cs" />
<Compile Include="UserConfig.cs" />
diff --git a/ShiftOS_TheReturn/UniteClient.cs b/ShiftOS.Objects/UniteClient.cs
index d8e34b7..d8e34b7 100644
--- a/ShiftOS_TheReturn/UniteClient.cs
+++ b/ShiftOS.Objects/UniteClient.cs
diff --git a/ShiftOS_TheReturn/ShiftOS.Engine.csproj b/ShiftOS_TheReturn/ShiftOS.Engine.csproj
index f0993a8..8b48023 100644
--- a/ShiftOS_TheReturn/ShiftOS.Engine.csproj
+++ b/ShiftOS_TheReturn/ShiftOS.Engine.csproj
@@ -132,7 +132,6 @@
<Compile Include="TerminalBackend.cs" />
<Compile Include="TerminalTextWriter.cs" />
<Compile Include="TutorialManager.cs" />
- <Compile Include="UniteClient.cs" />
<Compile Include="UserManagementCommands.cs" />
<Compile Include="WinOpenAttribute.cs" />
<EmbeddedResource Include="Infobox.resx">