mirror of
https://github.com/seriocomedy/ShiftOS-C-.git
synced 2025-01-22 17:22:14 +00:00
Fixed Up and Added Features
This commit is contained in:
parent
05373252f6
commit
3730f2829e
4 changed files with 59 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using ShiftOS.FinalMission;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
@ -747,6 +747,9 @@ public void DoCommand()
|
||||||
case "timedistorter":
|
case "timedistorter":
|
||||||
cmd_histacom_timedistorter(args);
|
cmd_histacom_timedistorter(args);
|
||||||
break;
|
break;
|
||||||
|
case "about":
|
||||||
|
cmd_about(args);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
cmd_default(args);
|
cmd_default(args);
|
||||||
break;
|
break;
|
||||||
|
@ -2038,34 +2041,42 @@ public void cmd_dir(String[] args)
|
||||||
|
|
||||||
public void cmd_cd(String[] args)
|
public void cmd_cd(String[] args)
|
||||||
{
|
{
|
||||||
if (API.Upgrades["fileskimmer"])
|
try
|
||||||
{
|
{
|
||||||
if (args[1] == "..")
|
if (API.Upgrades["fileskimmer"])
|
||||||
{
|
{
|
||||||
if (GetPath(current_dir) != "/")
|
if (args[1] == "..")
|
||||||
{
|
{
|
||||||
current_dir = GetParent(current_dir);
|
if (GetPath(current_dir) != "/")
|
||||||
SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> ");
|
{
|
||||||
|
current_dir = GetParent(current_dir);
|
||||||
|
SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> ");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WriteLine("cd: Can't go up past the root.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
WriteLine("cd: Can't go up past the root.");
|
string newdir = current_dir + OSInfo.DirectorySeparator;
|
||||||
|
foreach (var dir in Directory.GetDirectories(current_dir))
|
||||||
|
{
|
||||||
|
if (new DirectoryInfo(dir).Name.ToLower() == args[1])
|
||||||
|
newdir = dir;
|
||||||
|
}
|
||||||
|
current_dir = newdir;
|
||||||
|
SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
{
|
catch (Exception e)
|
||||||
string newdir = current_dir + OSInfo.DirectorySeparator;
|
{
|
||||||
foreach (var dir in Directory.GetDirectories(current_dir))
|
WriteLine("cd: " + e);
|
||||||
{
|
|
||||||
if (new DirectoryInfo(dir).Name.ToLower() == args[1])
|
|
||||||
newdir = dir;
|
|
||||||
}
|
|
||||||
current_dir = newdir;
|
|
||||||
SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> ");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void cmd_upg(String[] args)
|
public void cmd_upg(String[] args)
|
||||||
{
|
{
|
||||||
if (API.DeveloperMode)
|
if (API.DeveloperMode)
|
||||||
|
@ -2890,6 +2901,9 @@ public void cmd_debug(String[] args)
|
||||||
API.DeveloperMode = false;
|
API.DeveloperMode = false;
|
||||||
WriteLine("Turned off developer mode. Use the passcode to turn it back on.");
|
WriteLine("Turned off developer mode. Use the passcode to turn it back on.");
|
||||||
break;
|
break;
|
||||||
|
case "end":
|
||||||
|
EndGameHandler.StartGoodEnding();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
WriteLine("Invalid argument: " + args[1] + ". Debug can only debug the following: 'shiftnet-story'.");
|
WriteLine("Invalid argument: " + args[1] + ". Debug can only debug the following: 'shiftnet-story'.");
|
||||||
break;
|
break;
|
||||||
|
@ -2996,6 +3010,15 @@ public void cmd_default(String[] args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// About Box, Created By Carver Harrison
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="args">String[] args</param>
|
||||||
|
public void cmd_about(String[] args)
|
||||||
|
{
|
||||||
|
API.CreateInfoboxSession("About ShiftOS", "ShiftOS Version " + ProductVersion + "\n Copyright 2014-2016 ShiftOS Dev Team \n Type 'credits' in Terminal to Show Credits", infobox.InfoboxMode.Info);
|
||||||
|
}
|
||||||
|
|
||||||
// HISTACOM REFERENCES, DO NOT REMOVE, CRUCIAL FOR SECRET STORY ARC
|
// HISTACOM REFERENCES, DO NOT REMOVE, CRUCIAL FOR SECRET STORY ARC
|
||||||
public void cmd_histacom_year(String[] args)
|
public void cmd_histacom_year(String[] args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -258,7 +258,7 @@ public static void SetupGUIforCurrent()
|
||||||
mguide.ButtonText = "End DevX";
|
mguide.ButtonText = "End DevX";
|
||||||
mguide.OnButtonClick = new Action(() =>
|
mguide.OnButtonClick = new Action(() =>
|
||||||
{
|
{
|
||||||
//code to run to start uninstall of ShiftOS.
|
StartGoodEnding();
|
||||||
});
|
});
|
||||||
objPrompt = "Firewall, check. Primary server, check. Secondary server, CHECK. Telemetry server, CHECK. Now it's time to disable DevX himself. After all, he IS just code.";
|
objPrompt = "Firewall, check. Primary server, check. Secondary server, CHECK. Telemetry server, CHECK. Now it's time to disable DevX himself. After all, he IS just code.";
|
||||||
break;
|
break;
|
||||||
|
@ -271,5 +271,13 @@ public static void SetupGUIforCurrent()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public static void StartGoodEnding()
|
||||||
|
{
|
||||||
|
var room = new FakeChatClient();
|
||||||
|
room.OtherCharacters = new List<string>();
|
||||||
|
room.OtherCharacters.Add("TheHiddenHacker");
|
||||||
|
room.Messages.Add("TheHiddenHacker", "After All This Time...");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -181,7 +181,6 @@ static void ExtractDependencies()
|
||||||
MessageBox.Show("Sorry to break the immersion, but we're currently downloading ShiftOS dependencies that'll make the game run MUCH better, such as the Lua engine and Gecko web renderer. Give us a moment. ShiftOS will continue to run while this happens but some things won't work right until we're finished.");
|
MessageBox.Show("Sorry to break the immersion, but we're currently downloading ShiftOS dependencies that'll make the game run MUCH better, such as the Lua engine and Gecko web renderer. Give us a moment. ShiftOS will continue to run while this happens but some things won't work right until we're finished.");
|
||||||
wc.DownloadFileAsync(new Uri("http://playshiftos.ml/shiftos/dependencies/ShiftOS_Dependencies.zip"), zippath);
|
wc.DownloadFileAsync(new Uri("http://playshiftos.ml/shiftos/dependencies/ShiftOS_Dependencies.zip"), zippath);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,6 +85,12 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="API.cs" />
|
<Compile Include="API.cs" />
|
||||||
|
<Compile Include="Apps\About.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="Apps\About.Designer.cs">
|
||||||
|
<DependentUpon>About.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Apps\Appscape.cs">
|
<Compile Include="Apps\Appscape.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
@ -401,6 +407,9 @@
|
||||||
<DependentUpon>WindowBorder.cs</DependentUpon>
|
<DependentUpon>WindowBorder.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="SkinEngine\WindowComposition.cs" />
|
<Compile Include="SkinEngine\WindowComposition.cs" />
|
||||||
|
<EmbeddedResource Include="Apps\About.resx">
|
||||||
|
<DependentUpon>About.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Apps\Appscape.resx">
|
<EmbeddedResource Include="Apps\Appscape.resx">
|
||||||
<DependentUpon>Appscape.cs</DependentUpon>
|
<DependentUpon>Appscape.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|
Loading…
Reference in a new issue