diff options
| author | Michael <[email protected]> | 2017-05-06 09:44:47 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-05-06 09:44:47 -0400 |
| commit | 57277a01d685b0e29a79e5d74a1465a2ceb23ef9 (patch) | |
| tree | 5f74b518bf121567076e0e270241beb38aa41f47 /ShiftOS_TheReturn | |
| parent | ba585e7614100b4e86dd0f043ee4be6341b67ea2 (diff) | |
| download | shiftos_thereturn-57277a01d685b0e29a79e5d74a1465a2ceb23ef9.tar.gz shiftos_thereturn-57277a01d685b0e29a79e5d74a1465a2ceb23ef9.tar.bz2 shiftos_thereturn-57277a01d685b0e29a79e5d74a1465a2ceb23ef9.zip | |
Most of TriWrite is implemented.
Diffstat (limited to 'ShiftOS_TheReturn')
| -rw-r--r-- | ShiftOS_TheReturn/Commands.cs | 17 | ||||
| -rw-r--r-- | ShiftOS_TheReturn/ServerManager.cs | 4 |
2 files changed, 16 insertions, 5 deletions
diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs index 57d1d34..dc0b3a2 100644 --- a/ShiftOS_TheReturn/Commands.cs +++ b/ShiftOS_TheReturn/Commands.cs @@ -276,6 +276,17 @@ namespace ShiftOS.Engine return true; } + [Command("restart")] + public static bool Restart() + { + SaveSystem.CurrentSave.Upgrades = new Dictionary<string, bool>(); + SaveSystem.CurrentSave.Codepoints = 0; + SaveSystem.CurrentSave.StoriesExperienced.Clear(); + SaveSystem.CurrentSave.StoriesExperienced.Add("mud_fundamentals"); + SaveSystem.SaveGame(); + Shiftorium.InvokeUpgradeInstalled(); + return true; + } [Command("freecp")] public static bool FreeCodepoints(Dictionary<string, object> args) @@ -283,8 +294,8 @@ namespace ShiftOS.Engine if (args.ContainsKey("amount")) try { - Int64 codepointsToAdd = Convert.ToInt64(args["amount"].ToString()); - SaveSystem.TransferCodepointsFrom("dev", codepointsToAdd); + long codepointsToAdd = Convert.ToInt64(args["amount"].ToString()); + SaveSystem.CurrentSave.Codepoints += codepointsToAdd; return true; } catch (Exception ex) @@ -293,7 +304,7 @@ namespace ShiftOS.Engine return true; } - SaveSystem.TransferCodepointsFrom("dev", 1000); + SaveSystem.CurrentSave.Codepoints += 1000; return true; } diff --git a/ShiftOS_TheReturn/ServerManager.cs b/ShiftOS_TheReturn/ServerManager.cs index 792b38d..825064b 100644 --- a/ShiftOS_TheReturn/ServerManager.cs +++ b/ShiftOS_TheReturn/ServerManager.cs @@ -55,7 +55,7 @@ namespace ShiftOS.Engine private static NetObjectClient client { get; set; } private static bool UserDisconnect = false; - public static TimeSpan DigitalSocietyPing + public static long DigitalSocietyPing { get; private set; @@ -148,7 +148,7 @@ namespace ShiftOS.Engine { if (PingTimer.IsRunning) { - DigitalSocietyPing = PingTimer.Elapsed; + DigitalSocietyPing = PingTimer.ElapsedMilliseconds; PingTimer.Reset(); } var msg = a.Data.Object as ServerMessage; |
