aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/VirusTestCommands.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-06-28 16:33:07 -0400
committerMichael <[email protected]>2017-06-28 16:33:07 -0400
commit27264a559d7fd40a0c2bc393a5e150c17da1539d (patch)
treeed02811fbd109b1637cd9b6a818af3eb4ce46e59 /ShiftOS.WinForms/VirusTestCommands.cs
parent6cdb8cb0253230f6f845afb549517c5c3f12d2d1 (diff)
downloadshiftos_thereturn-27264a559d7fd40a0c2bc393a5e150c17da1539d.tar.gz
shiftos_thereturn-27264a559d7fd40a0c2bc393a5e150c17da1539d.tar.bz2
shiftos_thereturn-27264a559d7fd40a0c2bc393a5e150c17da1539d.zip
Basics of the virus system
Diffstat (limited to 'ShiftOS.WinForms/VirusTestCommands.cs')
-rw-r--r--ShiftOS.WinForms/VirusTestCommands.cs25
1 files changed, 25 insertions, 0 deletions
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<string, object> args)
+ {
+ var id = args["id"].ToString();
+ var threatlevel = Convert.ToInt32(args["threatlevel"].ToString());
+
+ VirusManager.Infect(id, threatlevel);
+ }
+ }
+#endif
+} \ No newline at end of file