aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/Commands.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-05-06 09:44:47 -0400
committerMichael <[email protected]>2017-05-06 09:44:47 -0400
commit57277a01d685b0e29a79e5d74a1465a2ceb23ef9 (patch)
tree5f74b518bf121567076e0e270241beb38aa41f47 /ShiftOS_TheReturn/Commands.cs
parentba585e7614100b4e86dd0f043ee4be6341b67ea2 (diff)
downloadshiftos_thereturn-57277a01d685b0e29a79e5d74a1465a2ceb23ef9.tar.gz
shiftos_thereturn-57277a01d685b0e29a79e5d74a1465a2ceb23ef9.tar.bz2
shiftos_thereturn-57277a01d685b0e29a79e5d74a1465a2ceb23ef9.zip
Most of TriWrite is implemented.
Diffstat (limited to 'ShiftOS_TheReturn/Commands.cs')
-rw-r--r--ShiftOS_TheReturn/Commands.cs17
1 files changed, 14 insertions, 3 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;
}