aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.WinForms')
-rw-r--r--ShiftOS.WinForms/HackerCommands.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/ShiftOS.WinForms/HackerCommands.cs b/ShiftOS.WinForms/HackerCommands.cs
index f467eb2..316b7fc 100644
--- a/ShiftOS.WinForms/HackerCommands.cs
+++ b/ShiftOS.WinForms/HackerCommands.cs
@@ -2,12 +2,14 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
+using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Newtonsoft.Json;
using ShiftOS.Engine;
using ShiftOS.Objects;
+using ShiftOS.Objects.ShiftFS;
using ShiftOS.WinForms.Applications;
using static ShiftOS.Objects.ShiftFS.Utils;
@@ -674,6 +676,34 @@ namespace ShiftOS.WinForms
return true;
}
+ [Command("list", description ="Lists all story IDs.")]
+ public static bool ListIds()
+ {
+ foreach(var exec in System.IO.Directory.GetFiles(Environment.CurrentDirectory))
+ {
+ if(exec.ToLower().EndsWith(".exe") || exec.ToLower().EndsWith(".dll"))
+ {
+ try
+ {
+ var asm = Assembly.LoadFile(exec);
+ {
+ foreach(var type in asm.GetTypes())
+ {
+ foreach(var method in type.GetMethods(BindingFlags.Public | BindingFlags.Static))
+ {
+ var attr = method.GetCustomAttributes(false).FirstOrDefault(x => x is StoryAttribute);
+ if (attr != null)
+ Console.WriteLine(" - " + (attr as StoryAttribute).StoryID);
+ }
+ }
+ }
+ }
+ catch { }
+ }
+ }
+ return true;
+ }
+
[Command("unexperience", description = "Marks a story plot as not-experienced yet.", usage ="id:string")]
[RemoteLock]
[RequiresArgument("id")]