Fixed Couple Bugs and Crashes

- Fixed: Crash when Hacking With No Tools
- Fixed: Accessing directories outside of C:\ShiftOS using 'ls' command
- Added Small Features
This commit is contained in:
carverh 2016-07-20 20:47:35 -07:00
parent 4fe0de40aa
commit 2747ec98b7
3 changed files with 74 additions and 65 deletions

View file

@ -1377,10 +1377,17 @@ public string GetPath(string path)
}
public string GetParent(string path)
{
if (new DirectoryInfo(path).Parent.FullName.Contains("ShiftOS"))
{
var d = new DirectoryInfo(path);
return d.Parent.FullName;
}
else
{
return path;
}
}
public void DoCommand()
{

View file

@ -373,8 +373,16 @@ public static void StartHack(int cid, string upgrade)
{
StartHack(cid, GetRandomHack());
}
else {
var h = Tools[cid];
else
{
if (Tools.Count <= cid)
{
API.CreateInfoboxSession("Failed!", "No Hacking Tools Avalible!", infobox.InfoboxMode.Info);
return;
}
else
{
HackTool h = Tools[cid];
switch (h.Name)
{
case "Destabilizer Attack":
@ -432,6 +440,7 @@ public static void StartHack(int cid, string upgrade)
}
}
}
}
/// <summary>
/// Initiates the Hacker Battle training simulation.

View file

@ -1,16 +1,9 @@
ShiftOS #VER#
A game by Michael VanOverbeek
== Developers ==
Philip Adams
Michael VanOverbeek
Carver (www.harri.cf)
== External Libraries / Dependencies ==