From 27264a559d7fd40a0c2bc393a5e150c17da1539d Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 28 Jun 2017 16:33:07 -0400 Subject: Basics of the virus system --- ShiftOS.WinForms/VirusTestCommands.cs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ShiftOS.WinForms/VirusTestCommands.cs (limited to 'ShiftOS.WinForms/VirusTestCommands.cs') diff --git a/ShiftOS.WinForms/VirusTestCommands.cs b/ShiftOS.WinForms/VirusTestCommands.cs new file mode 100644 index 0000000..09f1a36 --- /dev/null +++ b/ShiftOS.WinForms/VirusTestCommands.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms +{ +#if DEBUG + public static class VirusTestCommands + { + [Command("infect", description = "DEBUG: Infect the system with a virus.")] + [RequiresArgument("id")] + [RequiresArgument("threatlevel")] + public static void Infect(Dictionary args) + { + var id = args["id"].ToString(); + var threatlevel = Convert.ToInt32(args["threatlevel"].ToString()); + + VirusManager.Infect(id, threatlevel); + } + } +#endif +} \ No newline at end of file -- cgit v1.2.3