aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.Frontend/Hacking
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS.Frontend/Hacking')
-rw-r--r--ShiftOS.Frontend/Hacking/HackableProvider.cs2
-rw-r--r--ShiftOS.Frontend/Hacking/HackerTestCommands.cs16
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()
{