diff options
| author | Michael <[email protected]> | 2017-08-02 10:23:13 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-08-02 10:23:13 -0400 |
| commit | 37cf129165916101ba665891d157c85ea9c37383 (patch) | |
| tree | bc184d6be19bdf1258faba51a1323bfeec676502 /ShiftOS.Frontend/Hacking | |
| parent | 10d2c0bbaa2b5c933a37056c784d3de84fa82eaf (diff) | |
| download | shiftos_thereturn-37cf129165916101ba665891d157c85ea9c37383.tar.gz shiftos_thereturn-37cf129165916101ba665891d157c85ea9c37383.tar.bz2 shiftos_thereturn-37cf129165916101ba665891d157c85ea9c37383.zip | |
The first loot!
Diffstat (limited to 'ShiftOS.Frontend/Hacking')
| -rw-r--r-- | ShiftOS.Frontend/Hacking/HackableProvider.cs | 2 | ||||
| -rw-r--r-- | ShiftOS.Frontend/Hacking/HackerTestCommands.cs | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/ShiftOS.Frontend/Hacking/HackableProvider.cs b/ShiftOS.Frontend/Hacking/HackableProvider.cs index 83409c5..d661147 100644 --- a/ShiftOS.Frontend/Hacking/HackableProvider.cs +++ b/ShiftOS.Frontend/Hacking/HackableProvider.cs @@ -13,7 +13,7 @@ namespace ShiftOS.Frontend { public byte[] FindLootBytes(string id) { - foreach(var res in typeof(Properties.Resources).GetProperties(System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static)) + foreach(var res in typeof(Properties.Resources).GetProperties(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static)) { if(res.Name == id) { diff --git a/ShiftOS.Frontend/Hacking/HackerTestCommands.cs b/ShiftOS.Frontend/Hacking/HackerTestCommands.cs index 72c648e..77bb378 100644 --- a/ShiftOS.Frontend/Hacking/HackerTestCommands.cs +++ b/ShiftOS.Frontend/Hacking/HackerTestCommands.cs @@ -11,6 +11,22 @@ namespace ShiftOS.Frontend public static class HackerTestCommands { [ShellConstraint("shiftos_debug> ")] + [Command("loot")] + [RequiresArgument("id")] + public static void ViewLoot(Dictionary<string, object> args) + { + string id = args["id"].ToString(); + var loot = Hacking.AvailableLoot.FirstOrDefault(x => x.ID == id); + if(loot == null) + { + Console.WriteLine("Loot ID not found."); + return; + } + Objects.ShiftFS.Utils.WriteAllBytes("0:/" + loot.LootName, Hacking.GetLootBytes(loot.ID)); + FileSkimmerBackend.OpenFile("0:/" + loot.LootName); + } + + [ShellConstraint("shiftos_debug> ")] [Command("lsports")] public static void ListAllPorts() { |
