diff options
| author | william341 <[email protected]> | 2017-07-27 19:36:46 -0700 |
|---|---|---|
| committer | william341 <[email protected]> | 2017-07-27 19:37:00 -0700 |
| commit | f4e39bb9117a692c543ecf17e79ed98c95ffc70e (patch) | |
| tree | ad5f80b83dcd66bfc0c057a9020ea3993159281f /ShiftOS_TheReturn | |
| parent | b2e3a661ee6ab3308968efeb275e457776abebc3 (diff) | |
| download | shiftos_thereturn-f4e39bb9117a692c543ecf17e79ed98c95ffc70e.tar.gz shiftos_thereturn-f4e39bb9117a692c543ecf17e79ed98c95ffc70e.tar.bz2 shiftos_thereturn-f4e39bb9117a692c543ecf17e79ed98c95ffc70e.zip | |
hacking works like actually it does kindof
Diffstat (limited to 'ShiftOS_TheReturn')
| -rw-r--r-- | ShiftOS_TheReturn/Hacking.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ShiftOS_TheReturn/Hacking.cs b/ShiftOS_TheReturn/Hacking.cs index a691767..337ac04 100644 --- a/ShiftOS_TheReturn/Hacking.cs +++ b/ShiftOS_TheReturn/Hacking.cs @@ -95,6 +95,8 @@ namespace ShiftOS.Engine hsys.MillisecondsCountdown = 0; } hsys.PortsToUnlock = new List<Objects.Port>(); + hsys.VectorsUnlocked = new List<Objects.SystemType>(); + hsys.PayloadExecuted = new List<Objects.Payload>(); foreach(Objects.Port porttocheck in Ports) { if (data.SystemType.HasFlag(porttocheck.AttachTo)) @@ -109,6 +111,7 @@ namespace ShiftOS.Engine throw new NaughtyDeveloperException("Someone tried to fail a non-existent hack."); if (CurrentHackable.IsPwn3d) throw new NaughtyDeveloperException("A developer tried to un-pwn a pwn3d hackable."); + Console.WriteLine("[sploitset] [FAIL] disconnected - connection terminated by remote machine "); if (!string.IsNullOrWhiteSpace(CurrentHackable.Data.OnHackFailedStoryEvent)) Story.Start(CurrentHackable.Data.OnHackFailedStoryEvent); if (Objects.ShiftFS.Utils.Mounts.Contains(CurrentHackable.Filesystem)) @@ -116,6 +119,28 @@ namespace ShiftOS.Engine CurrentHackable = null; } + public static void EndHack() + { + if (CurrentHackable == null) + throw new NaughtyDeveloperException("Someone tried to end a non-existent hack."); + if (Objects.ShiftFS.Utils.Mounts.Contains(CurrentHackable.Filesystem)) + Objects.ShiftFS.Utils.Mounts.Remove(CurrentHackable.Filesystem); + Console.WriteLine("[sploitset] [FAIL] disconnected for unknown reason"); + CurrentHackable = null; + } + + public static void FinishHack() + { + if (CurrentHackable == null) + throw new NaughtyDeveloperException("Someone tried to finish a non-existent hack."); + if (!string.IsNullOrWhiteSpace(CurrentHackable.Data.OnHackCompleteStoryEvent)) + Story.Start(CurrentHackable.Data.OnHackCompleteStoryEvent); + if (Objects.ShiftFS.Utils.Mounts.Contains(CurrentHackable.Filesystem)) + Objects.ShiftFS.Utils.Mounts.Remove(CurrentHackable.Filesystem); + Console.WriteLine("[sploitset] disconnected with payload applied"); + CurrentHackable = null; + } + public static void Initiate() { foreach(var type in ReflectMan.Types.Where(x => x.GetInterfaces().Contains(typeof(IHackableProvider)))) @@ -188,6 +213,8 @@ namespace ShiftOS.Engine { public Objects.Hackable Data { get; set; } public List<Objects.Port> PortsToUnlock { get; set; } + public List<Objects.SystemType> VectorsUnlocked { get; set; } + public List<Objects.Payload> PayloadExecuted { get; set; } public bool FirewallCracked { get; set; } public Objects.ShiftFS.Directory Filesystem { get; set; } public double MillisecondsCountdown { get; set; } |
