Merge pull request #8 from carverh/master

Fixed Bugs, Added Story, Added Commands, Cleaned Up Source, and More
This commit is contained in:
Michael VanOverbeek 2016-07-21 10:31:59 -07:00 committed by GitHub
commit b9911efba3
15 changed files with 5222 additions and 5134 deletions

17
.gitattributes vendored Normal file
View file

@ -0,0 +1,17 @@
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

View file

@ -90,6 +90,7 @@
this.txtaddress.Size = new System.Drawing.Size(640, 20); this.txtaddress.Size = new System.Drawing.Size(640, 20);
this.txtaddress.TabIndex = 0; this.txtaddress.TabIndex = 0;
this.txtaddress.Text = "shiftnet://main"; this.txtaddress.Text = "shiftnet://main";
this.txtaddress.TextChanged += new System.EventHandler(this.txtaddress_TextChanged);
// //
// wbshiftnet // wbshiftnet
// //

View file

@ -60,11 +60,17 @@ namespace ShiftOS
wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main"); wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main");
txtaddress.Text = WebLayer.LastUrl; txtaddress.Text = WebLayer.LastUrl;
} }
private void txtaddress_TextChanged(object sender, EventArgs e)
{
}
} }
public class WebLayer public class WebLayer
{ {
private static string HtmlTemplate = "<html><head><title>Shiftnet Page</title><link rel=\"stylesheet\" href=\"http://playshiftos.ml/shiftnet.css\"/></head><body>#BODY#</body></html>"; public static String serverurl = "http://playshiftos.ml";
private static string HtmlTemplate = "<html><head><title>Shiftnet Page</title><link rel=\"stylesheet\" href=\"" + serverurl + "/shiftnet.css\"/></head><body>#BODY#</body></html>";
public static string LastUrl = null; public static string LastUrl = null;
public static string VisitSite(string url) public static string VisitSite(string url)
@ -74,7 +80,7 @@ namespace ShiftOS
{ {
try try
{ {
string content = wc.DownloadString(url.Replace("shiftnet://", "http://www.playshiftos.ml/shiftnet/www/")); string content = wc.DownloadString(url.Replace("shiftnet://", serverurl + "/shiftnet/www/"));
if (content.StartsWith("<!STML>")) if (content.StartsWith("<!STML>"))
{ {
LastUrl = url; LastUrl = url;

File diff suppressed because it is too large Load diff

View file

@ -8,6 +8,12 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
/*
* WARNING: SOME PARTS OF THIS FILE ARE NSFW
* AS WITH REAL LIFE, VIRUSES ARE NAMED VULGAR THINGS THAT MAY BE NOT APPROPIATE FOR WORK, SCHOOL OR GRANDMOTHER'S BIRTHDAY
* JUST DON'T USE THE WORK OR SCHOOL COMPUTERS TO EDIT THIS FILE, THANK YOU
*/
namespace ShiftOS namespace ShiftOS
{ {
class Viruses class Viruses

View file

@ -291,6 +291,8 @@ namespace ShiftOS
/// <param name="cid">Tool ID.</param> /// <param name="cid">Tool ID.</param>
/// <param name="hack">The hack type.</param> /// <param name="hack">The hack type.</param>
public static void StartHack(int cid, Hack hack) public static void StartHack(int cid, Hack hack)
{
try
{ {
var h = Tools[cid]; var h = Tools[cid];
switch (h.Name) switch (h.Name)
@ -311,7 +313,8 @@ namespace ShiftOS
} }
else else
{ {
try { try
{
int p = rnd.Next(0, 10); int p = rnd.Next(0, 10);
switch (p) switch (p)
{ {
@ -361,6 +364,11 @@ namespace ShiftOS
break; break;
} }
} }
catch
{
API.CreateInfoboxSession("Hacking Failed!", "No Hacking Tools Avalible", infobox.InfoboxMode.Info); // Carver: Fixed Hacking Bug
}
}
/// <summary> /// <summary>
/// Start a hack with a tool, to attempt to get an upgrade. /// Start a hack with a tool, to attempt to get an upgrade.
@ -373,8 +381,16 @@ namespace ShiftOS
{ {
StartHack(cid, GetRandomHack()); StartHack(cid, GetRandomHack());
} }
else { else
var h = Tools[cid]; {
if (Tools.Count <= cid)
{
API.CreateInfoboxSession("Hacking Failed!", "No Hacking Tools Avalible!", infobox.InfoboxMode.Info); // bugfix: Crash on No Tools
return;
}
else
{
HackTool h = Tools[cid];
switch (h.Name) switch (h.Name)
{ {
case "Destabilizer Attack": case "Destabilizer Attack":
@ -392,7 +408,7 @@ namespace ShiftOS
} }
else else
{ {
int p = rnd.Next(0, 10); int p = rnd.Next(0, 11);
switch (p) switch (p)
{ {
case 1: case 1:
@ -405,21 +421,24 @@ namespace ShiftOS
API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info); API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info);
break; break;
case 4: case 4:
API.PlaySound(Properties.Resources._3beepvirus); API.CreateInfoboxSession(API.Encryption.Encrypt("No I Will Not"), API.Encryption.Encrypt("The Truth is Out There."), infobox.InfoboxMode.Info);
break; break;
case 5: case 5:
API.CurrentSession.BackColor = Color.White; API.PlaySound(Properties.Resources._3beepvirus);
break; break;
case 6: case 6:
API.CurrentSession.BackColor = Color.Black; API.CurrentSession.BackColor = Color.White;
break; break;
case 7: case 7:
API.PlaySound(Properties.Resources.dial_up_modem_02); API.CurrentSession.BackColor = Color.Black;
break; break;
case 8: case 8:
API.PlaySound(Properties.Resources.writesound); API.PlaySound(Properties.Resources.dial_up_modem_02);
break; break;
case 9: case 9:
API.PlaySound(Properties.Resources.writesound);
break;
case 10:
API.PlaySound(Properties.Resources.typesound); API.PlaySound(Properties.Resources.typesound);
break; break;
} }
@ -432,6 +451,7 @@ namespace ShiftOS
} }
} }
} }
}
/// <summary> /// <summary>
/// Initiates the Hacker Battle training simulation. /// Initiates the Hacker Battle training simulation.
@ -455,6 +475,7 @@ namespace ShiftOS
} }
else else
{ {
Console.WriteLine("Hackers List Missing, Loading Defaults");
var c = new Character("BinaryFire", "I may not be good, but it's what I like to do. You don't need to pay me.", 25, 10, 0); var c = new Character("BinaryFire", "I may not be good, but it's what I like to do. You don't need to pay me.", 25, 10, 0);
AddCharacter(c); AddCharacter(c);
File.WriteAllText(Paths.SystemDir + "_hackers.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Characters))); File.WriteAllText(Paths.SystemDir + "_hackers.json", API.Encryption.Encrypt(JsonConvert.SerializeObject(Characters)));

View file

@ -376,7 +376,8 @@ namespace ShiftOS.Properties {
/// &quot;You may realize that ShiftOS is quite locked down. This is to prevent anything bad from happening.&quot;:&quot;???&quot;, /// &quot;You may realize that ShiftOS is quite locked down. This is to prevent anything bad from happening.&quot;:&quot;???&quot;,
/// &quot;However, in your Terminal, you should be able to run &apos;quests&apos; to view all the tasks we need to accomplish.&quot;:&quot;???&quot;, /// &quot;However, in your Terminal, you should be able to run &apos;quests&apos; to view all the tasks we need to accomplish.&quot;:&quot;???&quot;,
/// &quot;You&apos;ll also see a window near the App Launcher, I will use it to talk to you as we do things.&quot;:&quot;???&quot;, /// &quot;You&apos;ll also see a window near the App Launcher, I will use it to talk to you as we do things.&quot;:&quot;???&quot;,
/// &quot;Well. Let&apos;s get started.&quot;:&quot;???&quot; /// [rest of string was truncated]&quot;;. /// &quot;Well. Let&apos;s get started.&quot;:&quot;???&quot;
/// [rest of string was truncated]&quot;;.
/// </summary> /// </summary>
internal static string Choice2 { internal static string Choice2 {
get { get {

View file

@ -1,15 +1,12 @@
ShiftOS #VER# ShiftOS #VER#
== Developers ==
Michael VanOverbeek
A game by Michael VanOverbeek Philip Adams
GabrielTK
PCSource
The Gitter Badger
Carver Harrison
== External Libraries / Dependencies == == External Libraries / Dependencies ==
@ -31,8 +28,6 @@ A game by Michael VanOverbeek
and various other amazing .NET libraries and various other amazing .NET libraries
== Music == == Music ==
All music in ShiftOS is provided by Free Songs to Use, whose YouTube channel can be found at https://www.youtube.com/channel/UCPSX-g40Ti1c5C7sbGNtGzA All music in ShiftOS is provided by Free Songs to Use, whose YouTube channel can be found at https://www.youtube.com/channel/UCPSX-g40Ti1c5C7sbGNtGzA
@ -50,48 +45,47 @@ SUPPORT THESE BRILLIANT ARTISTS!
• Support Miza: • Support Miza:
https://soundcloud.com/miza-official1 https://soundcloud.com/miza-official1
https://soundcloud.com/miza-official1 https://facebook.com/miza.official.page
https://www.facebook.com/miza.official.page
Support Lastep: Support Lastep:
https://www.youtube.com/channel/UCQoGdkBRqzjx12htDBhiCxQ https://youtube.com/channel/UCQoGdkBRqzjx12htDBhiCxQ
https://soundcloud.com/lastepmusic https://soundcloud.com/lastepmusic
https://twitter.com/LastepMusic https://twitter.com/LastepMusic
Support Tom Vanko: Support Tom Vanko:
https://soundcloud.com/tomvanko https://soundcloud.com/tomvanko
https://www.facebook.com/tomvankomusic https://facebook.com/tomvankomusic
https://twitter.com/tomvankomusic https://twitter.com/tomvankomusic
Support Timmo Hendriks: Support Timmo Hendriks:
https://soundcloud.com/dj-timmo https://soundcloud.com/dj-timmo
https://www.facebook.com/TimmoHendriksofficial https://facebook.com/TimmoHendriksofficial
https://twitter.com/Timmo_Hendriks https://twitter.com/Timmo_Hendriks
https://www.instagram.com/timmohendriks/ https://instagram.com/timmohendriks/
https://www.youtube.com/c/TimmoHendriks https://youtube.com/c/TimmoHendriks
Snapchat: Timmo_Hendriks Snapchat: Timmo_Hendriks
Support Mark Vank: Support Mark Vank:
https://soundcloud.com/markvank https://soundcloud.com/markvank
https://www.youtube.com/channel/UCb4ch0_TAKSDvq89NUIElLA https://youtube.com/channel/UCb4ch0_TAKSDvq89NUIElLA
https://twitter.com/MarkVank_ https://twitter.com/MarkVank_
https://www.facebook.com/HardMixOfficial https://facebook.com/HardMixOfficial
Support HardMix: Support HardMix:
https://soundcloud.com/hardmix-ap3x https://soundcloud.com/hardmix-ap3x
http://www.instagram.com/mebn2 http://instagram.com/mebn2
http://www.youtube.com/VoltiDubstep http://youtube.com/VoltiDubstep
Support Eric Rodriguez: Support Eric Rodriguez:
https://soundcloud.com/ericrodriguezofficial https://soundcloud.com/ericrodriguezofficial
https://instagram.com/ericrodriguezmusic/ https://instagram.com/ericrodriguezmusic/
https://www.youtube.com/user/ericrodriguezmusic https://youtube.com/user/ericrodriguezmusic
Go check out Free Songs To Use (and thank them for this brilliant music) Go check out Free Songs To Use (and thank them for this brilliant music)
Facebook: https://www.facebook.com/FreeSongsToUse Facebook: https://facebook.com/FreeSongsToUse
Twitter: https://twitter.com/FreeSongsToUse Twitter: https://twitter.com/FreeSongsToUse
Soundcloud: https://soundcloud.com/FreeSongsToUse Soundcloud: https://soundcloud.com/FreeSongsToUse
Instagram: https://www.instagram.com/freesongstouse_official Instagram: https://instagram.com/freesongstouse_official
== More of Michael's things == == More of Michael's things ==
@ -99,6 +93,9 @@ Instagram: https://www.instagram.com/freesongstouse_official
Enjoyed ShiftOS? Want to see more games and projects from Michael? Why not visit his website at http://michael.playshiftos.ml? Enjoyed ShiftOS? Want to see more games and projects from Michael? Why not visit his website at http://michael.playshiftos.ml?
== More of Carver's things ==
The More Bug Testing the Better. Check Me Out at http://www.harri.cf.
== Special Thanks == == Special Thanks ==
@ -109,13 +106,8 @@ On behalf of the ShiftOS development team, we would love to thank the following
- Philip Adams, a.k.a OSFirstTimer - Philip Adams, a.k.a OSFirstTimer
- All the amazing people on the ShiftOS Forums - All the amazing people on the ShiftOS Forums
Without your help, ShiftOS just wouldn't be what it is today. It probably wouldn't exist if it weren't for OSFirstTimer, and without BizSpark and Azure hosting our website and servers, you wouldn't be able to hear the amazing music you hear right now. That, and without the amazing people at the ShiftOS community bringing us new ideas, suggestions, bug reports, and being generally nice people, the project wouldn't get as far as it has. Without your help, ShiftOS just wouldn't be what it is today.
It probably wouldn't exist if it weren't for OSFirstTimer, and without BizSpark and Azure hosting our website and servers, you wouldn't be able to hear the amazing music you hear right now.
That, and without the amazing people at the ShiftOS community bringing us new ideas, suggestions, bug reports, and being generally nice people, the project wouldn't get as far as it has.
And finally, we want to thank you, #USER#, for giving our game a try. We hope you enjoyed and continue to enjoy it! And finally, we want to thank you, #USER#, for giving our game a try. We hope you enjoyed and continue to enjoy it!

View file

@ -216,17 +216,17 @@
<Compile Include="Dialogs\Graphic_Picker.Designer.cs"> <Compile Include="Dialogs\Graphic_Picker.Designer.cs">
<DependentUpon>Graphic_Picker.cs</DependentUpon> <DependentUpon>Graphic_Picker.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Gameplay\Hacking.cs" /> <Compile Include="Hacking\Hacking.cs" />
<Compile Include="Gameplay\HackUI.cs"> <Compile Include="Hacking\HackUI.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Gameplay\HackUI.Designer.cs"> <Compile Include="Hacking\HackUI.Designer.cs">
<DependentUpon>HackUI.cs</DependentUpon> <DependentUpon>HackUI.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Gameplay\HijackScreen.cs"> <Compile Include="Hacking\HijackScreen.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Gameplay\HijackScreen.Designer.cs"> <Compile Include="Hacking\HijackScreen.Designer.cs">
<DependentUpon>HijackScreen.cs</DependentUpon> <DependentUpon>HijackScreen.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Apps\HoloChat.cs"> <Compile Include="Apps\HoloChat.cs">
@ -464,10 +464,10 @@
<EmbeddedResource Include="Dialogs\Graphic_Picker.resx"> <EmbeddedResource Include="Dialogs\Graphic_Picker.resx">
<DependentUpon>Graphic_Picker.cs</DependentUpon> <DependentUpon>Graphic_Picker.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Gameplay\HackUI.resx"> <EmbeddedResource Include="Hacking\HackUI.resx">
<DependentUpon>HackUI.cs</DependentUpon> <DependentUpon>HackUI.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Gameplay\HijackScreen.resx"> <EmbeddedResource Include="Hacking\HijackScreen.resx">
<DependentUpon>HijackScreen.cs</DependentUpon> <DependentUpon>HijackScreen.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Apps\HoloChat.resx"> <EmbeddedResource Include="Apps\HoloChat.resx">