diff options
| author | Michael <[email protected]> | 2017-07-17 14:34:59 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-07-17 14:34:59 -0400 |
| commit | a0ee79dbcd26a8f07d493a7e993cbaf0d02e44db (patch) | |
| tree | d974220621e6cfcfe745c2825149ca370e3a7aab /ShiftOS.Frontend/HackerTestCommands.cs | |
| parent | e929a9f5105c00b0a3a2b4e75a876bbb95bbfa7b (diff) | |
| download | shiftos_thereturn-a0ee79dbcd26a8f07d493a7e993cbaf0d02e44db.tar.gz shiftos_thereturn-a0ee79dbcd26a8f07d493a7e993cbaf0d02e44db.tar.bz2 shiftos_thereturn-a0ee79dbcd26a8f07d493a7e993cbaf0d02e44db.zip | |
Hacking, barebones fskimmer, double clicking
Diffstat (limited to 'ShiftOS.Frontend/HackerTestCommands.cs')
| -rw-r--r-- | ShiftOS.Frontend/HackerTestCommands.cs | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/ShiftOS.Frontend/HackerTestCommands.cs b/ShiftOS.Frontend/HackerTestCommands.cs new file mode 100644 index 0000000..675356a --- /dev/null +++ b/ShiftOS.Frontend/HackerTestCommands.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ShiftOS.Engine; + +#if DEBUG +namespace ShiftOS.Frontend +{ + public static class HackerTestCommands + { + [Command("lshackables")] + public static void ListAllHackables() + { + foreach(var hackable in Hacking.AvailableToHack) + { + Console.WriteLine(hackable.ID + ": " + hackable.FriendlyName); + } + } + + [Command("describebackable")] + [RequiresArgument("id")] + public static void DescribeHackable(Dictionary<string, object> args) + { + string id = args["id"].ToString(); + var hackable = Hacking.AvailableToHack.FirstOrDefault(x => x.ID == id); + if(hackable == null) + { + Console.WriteLine("Hackable not found."); + return; + } + Console.WriteLine(hackable.FriendlyName); + Console.WriteLine("------------------------"); + Console.WriteLine(); + Console.WriteLine("System name: " + hackable.SystemName); + Console.WriteLine("Loot rarity: " + hackable.LootRarity); + Console.WriteLine("Loot amount: " + hackable.LootAmount); + Console.WriteLine("Connection timeout level: " + hackable.ConnectionTimeoutLevel); + Console.WriteLine(); + Console.WriteLine(hackable.WelcomeMessage); + } + + [Command("inithack")] + [RequiresArgument("id")] + public static void InitHack(Dictionary<string, object> args) + { + string id = args["id"].ToString(); + var hackable = Hacking.AvailableToHack.FirstOrDefault(x => x.ID == id); + if (hackable == null) + { + Console.WriteLine("Hackable not found."); + return; + } + Hacking.InitHack(hackable); + } + } +} +#endif
\ No newline at end of file |
