aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS_TheReturn')
-rw-r--r--ShiftOS_TheReturn/Commands.cs33
-rw-r--r--ShiftOS_TheReturn/FileSkimmerBackend.cs6
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs5
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
+ {
+
+ }
}