From 51ad9434bb2118ad4d5dd796d047415c76e99ccc Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 8 Feb 2017 15:51:22 -0500 Subject: Shop work. - Shop Editor implemented. - Shop List implemented. - Shops are now a way to earn Codepoints. --- ShiftOS_TheReturn/Commands.cs | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'ShiftOS_TheReturn/Commands.cs') 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 args) + [Command("unbuy")] + [RequiresArgument("upgrade")] + public static bool UnbuyUpgrade(Dictionary 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()) { -- cgit v1.2.3