diff options
| author | william341 <[email protected]> | 2017-05-28 12:37:00 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-05-28 12:37:00 -0700 |
| commit | 771c20cfb3a703e0f1550fdcf9eb07b78298c944 (patch) | |
| tree | 59cb532e15ebff313fdba2be264d78ec0033f407 /ShiftOS.Objects/Save.cs | |
| parent | 496b0cbf8659c99203f48210fd39c572400ae623 (diff) | |
| parent | c7ba7d733c756d196f98dd4533289a1ef4db715f (diff) | |
| download | shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.gz shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.tar.bz2 shiftos_thereturn-771c20cfb3a703e0f1550fdcf9eb07b78298c944.zip | |
Merge pull request #1 from shiftos-game/master
welp, no longer a dev.
Diffstat (limited to 'ShiftOS.Objects/Save.cs')
| -rw-r--r-- | ShiftOS.Objects/Save.cs | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/ShiftOS.Objects/Save.cs b/ShiftOS.Objects/Save.cs index 3c7cb39..f4e1e09 100644 --- a/ShiftOS.Objects/Save.cs +++ b/ShiftOS.Objects/Save.cs @@ -34,8 +34,40 @@ namespace ShiftOS.Objects //Better to store this stuff server-side so we can do some neat stuff with hacking... public class Save { + + public int MusicVolume { get; set; } + public int SfxVolume { get; set; } + + [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; } - public long Codepoints { 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 Dictionary<string, bool> Upgrades { get; set; } public int StoryPosition { get; set; } public string Language { get; set; } @@ -45,6 +77,21 @@ namespace ShiftOS.Objects public int MinorVersion { get; set; } public int Revision { get; set; } + public string UniteAuthToken { get; set; } + + public bool IsPatreon { get; set; } + + public UserClass Class { get; set; } + public double RawReputation { get; set; } + + public Reputation Reputation + { + get + { + return (Reputation)((int)Math.Round(RawReputation)); + } + } + public string Password { get; set; } public bool PasswordHashed { get; set; } public string SystemName { get; set; } @@ -65,6 +112,9 @@ namespace ShiftOS.Objects } } + public int LastMonthPaid { get; set; } + public List<string> StoriesExperienced { get; set; } + public int CountUpgrades() { int count = 0; @@ -75,6 +125,8 @@ namespace ShiftOS.Objects } return count; } + + public List<ClientSave> Users { get; set; } } public class SettingsObject : DynamicObject |
