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 @@ private void InitializeComponent()
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 @@ private void btnhome_Click(object sender, EventArgs e)
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 @@ public static string VisitSite(string url)
{ {
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.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

@ -292,73 +292,81 @@ public static void StartHackWithCharacter(int cid, string upgrade)
/// <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)
{ {
var h = Tools[cid]; try
switch (h.Name)
{ {
case "Destabilizer Attack": var h = Tools[cid];
var t = new Timer(); switch (h.Name)
{
case "Destabilizer Attack":
var t = new Timer();
t.Interval = 100; t.Interval = 100;
var rnd = new Random(); var rnd = new Random();
t.Tick += (object s, EventArgs a) => t.Tick += (object s, EventArgs a) =>
{
int r = rnd.Next(0, 100);
if (r == 90)
{ {
t.Stop(); int r = rnd.Next(0, 100);
if (r == 90)
API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info);
GiveHack(hack);
}
else
{
try {
int p = rnd.Next(0, 10);
switch (p)
{
case 1:
API.OpenProgram("shiftorium");
break;
case 2:
API.OpenProgram("ki");
break;
case 3:
API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info);
break;
case 4:
API.PlaySound(Properties.Resources._3beepvirus);
break;
case 5:
API.CurrentSession.BackColor = Color.White;
break;
case 6:
API.CurrentSession.BackColor = Color.Black;
break;
case 7:
API.PlaySound(Properties.Resources.dial_up_modem_02);
break;
case 8:
API.PlaySound(Properties.Resources.writesound);
break;
case 9:
API.PlaySound(Properties.Resources.typesound);
break;
}
}
catch
{ {
t.Stop(); t.Stop();
var tr = new Terminal();
tr.Show(); API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info);
tr.WindowState = FormWindowState.Maximized; GiveHack(hack);
tr.txtterm.BackColor = Color.Red;
tr.Crash();
} }
} else
}; {
t.Start(); try
{
int p = rnd.Next(0, 10);
switch (p)
{
case 1:
API.OpenProgram("shiftorium");
break;
case 2:
API.OpenProgram("ki");
break;
case 3:
API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info);
break;
case 4:
API.PlaySound(Properties.Resources._3beepvirus);
break;
case 5:
API.CurrentSession.BackColor = Color.White;
break;
case 6:
API.CurrentSession.BackColor = Color.Black;
break;
case 7:
API.PlaySound(Properties.Resources.dial_up_modem_02);
break;
case 8:
API.PlaySound(Properties.Resources.writesound);
break;
case 9:
API.PlaySound(Properties.Resources.typesound);
break;
}
}
catch
{
t.Stop();
var tr = new Terminal();
tr.Show();
tr.WindowState = FormWindowState.Maximized;
tr.txtterm.BackColor = Color.Red;
tr.Crash();
}
}
};
t.Start();
break; break;
}
}
catch
{
API.CreateInfoboxSession("Hacking Failed!", "No Hacking Tools Avalible", infobox.InfoboxMode.Info); // Carver: Fixed Hacking Bug
} }
} }
@ -373,62 +381,74 @@ public static void StartHack(int cid, string upgrade)
{ {
StartHack(cid, GetRandomHack()); StartHack(cid, GetRandomHack());
} }
else { else
var h = Tools[cid]; {
switch(h.Name) if (Tools.Count <= cid)
{ {
case "Destabilizer Attack": API.CreateInfoboxSession("Hacking Failed!", "No Hacking Tools Avalible!", infobox.InfoboxMode.Info); // bugfix: Crash on No Tools
var t = new Timer(); return;
t.Interval = 1000 / h.Effectiveness; }
var rnd = new Random(); else
t.Tick += (object s, EventArgs a) => {
{ HackTool h = Tools[cid];
int r = rnd.Next(0, 100); switch (h.Name)
if(r == 90) {
case "Destabilizer Attack":
var t = new Timer();
t.Interval = 1000 / h.Effectiveness;
var rnd = new Random();
t.Tick += (object s, EventArgs a) =>
{ {
t.Stop(); int r = rnd.Next(0, 100);
API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info); if (r == 90)
GiveUpgrade(upgrade);
}
else
{
int p = rnd.Next(0, 10);
switch(p)
{ {
case 1: t.Stop();
API.OpenProgram("shiftorium"); API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info);
break; GiveUpgrade(upgrade);
case 2:
API.OpenProgram("ki");
break;
case 3:
API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info);
break;
case 4:
API.PlaySound(Properties.Resources._3beepvirus);
break;
case 5:
API.CurrentSession.BackColor = Color.White;
break;
case 6:
API.CurrentSession.BackColor = Color.Black;
break;
case 7:
API.PlaySound(Properties.Resources.dial_up_modem_02);
break;
case 8:
API.PlaySound(Properties.Resources.writesound);
break;
case 9:
API.PlaySound(Properties.Resources.typesound);
break;
} }
} else
}; {
t.Start(); int p = rnd.Next(0, 11);
switch (p)
{
case 1:
API.OpenProgram("shiftorium");
break;
case 2:
API.OpenProgram("ki");
break;
case 3:
API.CreateInfoboxSession(API.Encryption.Encrypt("Praise Lord Michael"), API.Encryption.Encrypt("You will bow down to me."), infobox.InfoboxMode.Info);
break;
case 4:
API.CreateInfoboxSession(API.Encryption.Encrypt("No I Will Not"), API.Encryption.Encrypt("The Truth is Out There."), infobox.InfoboxMode.Info);
break;
case 5:
API.PlaySound(Properties.Resources._3beepvirus);
break;
case 6:
API.CurrentSession.BackColor = Color.White;
break;
case 7:
API.CurrentSession.BackColor = Color.Black;
break;
case 8:
API.PlaySound(Properties.Resources.dial_up_modem_02);
break;
case 9:
API.PlaySound(Properties.Resources.writesound);
break;
case 10:
API.PlaySound(Properties.Resources.typesound);
break;
}
}
};
t.Start();
break; break;
}
} }
} }
} }
@ -455,6 +475,7 @@ public static void GetCharacters()
} }
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)));

File diff suppressed because it is too large Load diff

View file

@ -1,18 +1,15 @@
ShiftOS #VER# ShiftOS #VER#
== Developers ==
Michael VanOverbeek
Philip Adams
GabrielTK
PCSource
The Gitter Badger
Carver Harrison
A game by Michael VanOverbeek == External Libraries / Dependencies ==
== External Libraries / Dependencies ==
JSON.NET - Version 8.0.2 JSON.NET - Version 8.0.2
By James Newton-King By James Newton-King
@ -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,9 +93,12 @@ 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 ==
On behalf of the ShiftOS development team, we would love to thank the following amazing people and groups: On behalf of the ShiftOS development team, we would love to thank the following amazing people and groups:
@ -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">