aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/Commands.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-08 15:51:22 -0500
committerMichael <[email protected]>2017-02-08 15:51:22 -0500
commit51ad9434bb2118ad4d5dd796d047415c76e99ccc (patch)
treea0b770b4824e72b24968a0451378aa33ecdb7d85 /ShiftOS_TheReturn/Commands.cs
parenta4b49ab68b4383e84ee200f47ea21ed1b4b22ffa (diff)
downloadshiftos_thereturn-51ad9434bb2118ad4d5dd796d047415c76e99ccc.tar.gz
shiftos_thereturn-51ad9434bb2118ad4d5dd796d047415c76e99ccc.tar.bz2
shiftos_thereturn-51ad9434bb2118ad4d5dd796d047415c76e99ccc.zip
Shop work.
- Shop Editor implemented. - Shop List implemented. - Shops are now a way to earn Codepoints.
Diffstat (limited to 'ShiftOS_TheReturn/Commands.cs')
-rw-r--r--ShiftOS_TheReturn/Commands.cs33
1 files changed, 22 insertions, 11 deletions
diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs
index 7df700f..dcc96f2 100644
--- a/ShiftOS_TheReturn/Commands.cs
+++ b/ShiftOS_TheReturn/Commands.cs
@@ -230,20 +230,31 @@ namespace ShiftOS.Engine
}
#if DEVEL
- [Namespace("cheats", true)]
- public static class CheatCommands
+ [Namespace("dev")]
+ public static class ShiftOSDevCommands
{
- [Command("freecp", true)]
- [CommandObsolete("{OBSOLETE_CHEATS_FREECP}", "dev.freecp", true)]
- public static bool FreeCodepoints(Dictionary<string, object> args)
+ [Command("unbuy")]
+ [RequiresArgument("upgrade")]
+ public static bool UnbuyUpgrade(Dictionary<string, object> args)
{
- // never called
+ try
+ {
+ SaveSystem.CurrentSave.Upgrades[args["upgrade"] as string] = false;
+ }
+ catch
+ {
+ Console.WriteLine("Upgrade not found.");
+ }
return true;
}
- }
- [Namespace("dev")]
- public static class ShiftOSDevCommands
- {
+
+ [Command("getallupgrades")]
+ public static bool GetAllUpgrades()
+ {
+ Console.WriteLine(JsonConvert.SerializeObject(SaveSystem.CurrentSave.Upgrades, Formatting.Indented));
+ return true;
+ }
+
[Command("multarg")]
[RequiresArgument("id")]
[RequiresArgument("name")]
@@ -275,7 +286,7 @@ namespace ShiftOS.Engine
}
[Command("unlockeverything")]
- public static bool GetAllUpgrades()
+ public static bool UnlockAllUpgrades()
{
foreach (var upg in Shiftorium.GetDefaults())
{