aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/HackerCommands.cs
diff options
context:
space:
mode:
authorMichael VanOverbeek <[email protected]>2017-06-11 11:57:31 +0000
committerGitHub <[email protected]>2017-06-11 11:57:31 +0000
commit997a81457ebb6d6523c36ca552cee143e0d92244 (patch)
treeda98985ced112b6d238811f3ca770014d67e34fc /ShiftOS.WinForms/HackerCommands.cs
parent0d75f701778a0900a58343c4c80c124279bc231f (diff)
parent107a98686a105468b5f200ebcbd27343c1210ce4 (diff)
downloadshiftos_thereturn-997a81457ebb6d6523c36ca552cee143e0d92244.tar.gz
shiftos_thereturn-997a81457ebb6d6523c36ca552cee143e0d92244.tar.bz2
shiftos_thereturn-997a81457ebb6d6523c36ca552cee143e0d92244.zip
Merge pull request #129 from RogueAI42/master
ReflectMan Saves The Day..............
Diffstat (limited to 'ShiftOS.WinForms/HackerCommands.cs')
-rw-r--r--ShiftOS.WinForms/HackerCommands.cs25
1 files changed, 5 insertions, 20 deletions
diff --git a/ShiftOS.WinForms/HackerCommands.cs b/ShiftOS.WinForms/HackerCommands.cs
index 316b7fc..dd8bde8 100644
--- a/ShiftOS.WinForms/HackerCommands.cs
+++ b/ShiftOS.WinForms/HackerCommands.cs
@@ -679,28 +679,13 @@ namespace ShiftOS.WinForms
[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"))
+ foreach(var type in ReflectMan.Types)
+ foreach(var method in type.GetMethods(BindingFlags.Public | BindingFlags.Static))
{
- 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 { }
+ var attr = method.GetCustomAttributes(false).FirstOrDefault(x => x is StoryAttribute);
+ if (attr != null)
+ Console.WriteLine(" - " + (attr as StoryAttribute).StoryID);
}
- }
return true;
}