diff options
| author | william341 <[email protected]> | 2017-06-18 16:43:30 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-06-18 16:43:30 -0700 |
| commit | ba80dcf3f80018cbb041b62ad8a40268427d1311 (patch) | |
| tree | f0bd18b2355d34c07c744c3cd82a4725a799eecd /ShiftOS.Objects | |
| parent | 771c20cfb3a703e0f1550fdcf9eb07b78298c944 (diff) | |
| parent | 12acff8742f4c64976bfabee1b70dc515190fc7c (diff) | |
| download | shiftos_thereturn-ba80dcf3f80018cbb041b62ad8a40268427d1311.tar.gz shiftos_thereturn-ba80dcf3f80018cbb041b62ad8a40268427d1311.tar.bz2 shiftos_thereturn-ba80dcf3f80018cbb041b62ad8a40268427d1311.zip | |
Merge pull request #2 from shiftos-game/master
wew
Diffstat (limited to 'ShiftOS.Objects')
| -rw-r--r-- | ShiftOS.Objects/EngineShiftnetSubscription.cs | 2 | ||||
| -rw-r--r-- | ShiftOS.Objects/Save.cs | 41 | ||||
| -rw-r--r-- | ShiftOS.Objects/Shop.cs | 2 | ||||
| -rw-r--r-- | ShiftOS.Objects/UniteClient.cs | 12 |
4 files changed, 19 insertions, 38 deletions
diff --git a/ShiftOS.Objects/EngineShiftnetSubscription.cs b/ShiftOS.Objects/EngineShiftnetSubscription.cs index 1296a98..c319f18 100644 --- a/ShiftOS.Objects/EngineShiftnetSubscription.cs +++ b/ShiftOS.Objects/EngineShiftnetSubscription.cs @@ -10,7 +10,7 @@ namespace ShiftOS.Objects { public string Name { get; set; } public string Description { get; set; } - public int CostPerMonth { get; set; } + public uint CostPerMonth { get; set; } public int DownloadSpeed { get; set; } public string Company { get; set; } } diff --git a/ShiftOS.Objects/Save.cs b/ShiftOS.Objects/Save.cs index f4e1e09..7323028 100644 --- a/ShiftOS.Objects/Save.cs +++ b/ShiftOS.Objects/Save.cs @@ -26,47 +26,23 @@ using System; using System.Collections.Generic; using System.Dynamic; using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Threading; 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; } + public bool MusicEnabled = true; + public bool SoundEnabled = true; + public int MusicVolume = 100; [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 bool IsSandbox = false; - } - } + public ulong Codepoints { get; set; } public Dictionary<string, bool> Upgrades { get; set; } public int StoryPosition { get; set; } @@ -127,6 +103,11 @@ namespace ShiftOS.Objects } public List<ClientSave> Users { get; set; } + + /// <summary> + /// DO NOT MODIFY THIS. EVER. YOU WILL BREAK THE STORYLINE. Let the engine do it's job. + /// </summary> + public string PickupPoint { get; set; } } public class SettingsObject : DynamicObject diff --git a/ShiftOS.Objects/Shop.cs b/ShiftOS.Objects/Shop.cs index 65f5746..c603523 100644 --- a/ShiftOS.Objects/Shop.cs +++ b/ShiftOS.Objects/Shop.cs @@ -42,7 +42,7 @@ namespace ShiftOS.Objects { public string Name { get; set; } public string Description { get; set; } - public int Cost { get; set; } + public ulong Cost { get; set; } public int FileType { get; set; } public byte[] MUDFile { get; set; } } diff --git a/ShiftOS.Objects/UniteClient.cs b/ShiftOS.Objects/UniteClient.cs index d8e34b7..ccd721b 100644 --- a/ShiftOS.Objects/UniteClient.cs +++ b/ShiftOS.Objects/UniteClient.cs @@ -83,9 +83,9 @@ namespace ShiftOS.Unite /// Get the Pong codepoint highscore for the current user. /// </summary> /// <returns>The amount of Codepoints returned by the server</returns> - public int GetPongCP() + public ulong GetPongCP() { - return Convert.ToInt32(MakeCall("/API/GetPongCP")); + return Convert.ToUInt64(MakeCall("/API/GetPongCP")); } /// <summary> @@ -110,7 +110,7 @@ namespace ShiftOS.Unite /// Set the pong Codepoints record for the user /// </summary> /// <param name="value">The amount of Codepoints to set the record to</param> - public void SetPongCP(int value) + public void SetPongCP(ulong value) { MakeCall("/API/SetPongCP/" + value.ToString()); } @@ -182,16 +182,16 @@ namespace ShiftOS.Unite /// Get the user's codepoints. /// </summary> /// <returns>The amount of codepoints stored on the server for this user.</returns> - public long GetCodepoints() + public ulong GetCodepoints() { - return Convert.ToInt64(MakeCall("/API/GetCodepoints")); + return Convert.ToUInt64(MakeCall("/API/GetCodepoints")); } /// <summary> /// Set the user's codepoints. /// </summary> /// <param name="value">The amount of codepoints to set the user's codepoints value to.</param> - public void SetCodepoints(long value) + public void SetCodepoints(ulong value) { MakeCall("/API/SetCodepoints/" + value.ToString()); } |
