diff options
| author | Michael <[email protected]> | 2017-02-08 15:51:22 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-08 15:51:22 -0500 |
| commit | 51ad9434bb2118ad4d5dd796d047415c76e99ccc (patch) | |
| tree | a0b770b4824e72b24968a0451378aa33ecdb7d85 /ShiftOS_TheReturn | |
| parent | a4b49ab68b4383e84ee200f47ea21ed1b4b22ffa (diff) | |
| download | shiftos_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')
| -rw-r--r-- | ShiftOS_TheReturn/Commands.cs | 33 | ||||
| -rw-r--r-- | ShiftOS_TheReturn/FileSkimmerBackend.cs | 6 | ||||
| -rw-r--r-- | ShiftOS_TheReturn/SaveSystem.cs | 5 |
3 files changed, 33 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()) { diff --git a/ShiftOS_TheReturn/FileSkimmerBackend.cs b/ShiftOS_TheReturn/FileSkimmerBackend.cs index 6e2f6be..36e07ec 100644 --- a/ShiftOS_TheReturn/FileSkimmerBackend.cs +++ b/ShiftOS_TheReturn/FileSkimmerBackend.cs @@ -133,6 +133,11 @@ namespace ShiftOS.Engine { return _fs.GetImage(filepath); } + + public static string GetFileExtension(FileType fileType) + { + return _fs.GetFileExtension(fileType); + } } /// <summary> @@ -144,6 +149,7 @@ namespace ShiftOS.Engine void GetPath(string[] filetypes, FileOpenerStyle style, Action<string> callback); void OpenDirectory(string path); Image GetImage(string path); + string GetFileExtension(FileType fileType); } diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs index 6ab6b1b..7107c7b 100644 --- a/ShiftOS_TheReturn/SaveSystem.cs +++ b/ShiftOS_TheReturn/SaveSystem.cs @@ -318,4 +318,9 @@ namespace ShiftOS.Engine } public delegate void TextSentEventHandler(string text); + + public class DeveloperAttribute : Attribute + { + + } } |
