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.TabIndex = 0;
this.txtaddress.Text = "shiftnet://main";
this.txtaddress.TextChanged += new System.EventHandler(this.txtaddress_TextChanged);
//
// wbshiftnet
//

View file

@ -60,11 +60,17 @@ private void btnhome_Click(object sender, EventArgs e)
wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main");
txtaddress.Text = WebLayer.LastUrl;
}
private void txtaddress_TextChanged(object sender, EventArgs e)
{
}
}
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 VisitSite(string url)
@ -74,7 +80,7 @@ public static string VisitSite(string url)
{
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>"))
{
LastUrl = url;

File diff suppressed because it is too large Load diff

View file

@ -8,6 +8,12 @@
using System.Threading.Tasks;
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
{
class Viruses

View file

@ -292,73 +292,81 @@ public static void StartHackWithCharacter(int cid, string upgrade)
/// <param name="hack">The hack type.</param>
public static void StartHack(int cid, Hack hack)
{
var h = Tools[cid];
switch (h.Name)
try
{
case "Destabilizer Attack":
var t = new Timer();
var h = Tools[cid];
switch (h.Name)
{
case "Destabilizer Attack":
var t = new Timer();
t.Interval = 100;
var rnd = new Random();
t.Tick += (object s, EventArgs a) =>
{
int r = rnd.Next(0, 100);
if (r == 90)
var rnd = new Random();
t.Tick += (object s, EventArgs a) =>
{
t.Stop();
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
int r = rnd.Next(0, 100);
if (r == 90)
{
t.Stop();
var tr = new Terminal();
tr.Show();
tr.WindowState = FormWindowState.Maximized;
tr.txtterm.BackColor = Color.Red;
tr.Crash();
API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info);
GiveHack(hack);
}
}
};
t.Start();
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();
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());
}
else {
var h = Tools[cid];
switch(h.Name)
else
{
if (Tools.Count <= cid)
{
case "Destabilizer Attack":
var t = new Timer();
t.Interval = 1000 / h.Effectiveness;
var rnd = new Random();
t.Tick += (object s, EventArgs a) =>
{
int r = rnd.Next(0, 100);
if(r == 90)
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)
{
case "Destabilizer Attack":
var t = new Timer();
t.Interval = 1000 / h.Effectiveness;
var rnd = new Random();
t.Tick += (object s, EventArgs a) =>
{
t.Stop();
API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info);
GiveUpgrade(upgrade);
}
else
{
int p = rnd.Next(0, 10);
switch(p)
int r = rnd.Next(0, 100);
if (r == 90)
{
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;
t.Stop();
API.CreateInfoboxSession("Hack complete.", "The hack has been completed.", infobox.InfoboxMode.Info);
GiveUpgrade(upgrade);
}
}
};
t.Start();
else
{
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
{
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);
AddCharacter(c);
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#
== 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
By James Newton-King
@ -31,8 +28,6 @@ A game by Michael VanOverbeek
and various other amazing .NET libraries
== 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
@ -50,48 +45,47 @@ SUPPORT THESE BRILLIANT ARTISTS!
• Support Miza:
https://soundcloud.com/miza-official1
https://soundcloud.com/miza-official1
https://www.facebook.com/miza.official.page
https://facebook.com/miza.official.page
Support Lastep:
https://www.youtube.com/channel/UCQoGdkBRqzjx12htDBhiCxQ
https://youtube.com/channel/UCQoGdkBRqzjx12htDBhiCxQ
https://soundcloud.com/lastepmusic
https://twitter.com/LastepMusic
Support Tom Vanko:
https://soundcloud.com/tomvanko
https://www.facebook.com/tomvankomusic
https://facebook.com/tomvankomusic
https://twitter.com/tomvankomusic
Support Timmo Hendriks:
https://soundcloud.com/dj-timmo
https://www.facebook.com/TimmoHendriksofficial
https://facebook.com/TimmoHendriksofficial
https://twitter.com/Timmo_Hendriks
https://www.instagram.com/timmohendriks/
https://www.youtube.com/c/TimmoHendriks
https://instagram.com/timmohendriks/
https://youtube.com/c/TimmoHendriks
Snapchat: Timmo_Hendriks
Support Mark Vank:
https://soundcloud.com/markvank
https://www.youtube.com/channel/UCb4ch0_TAKSDvq89NUIElLA
https://youtube.com/channel/UCb4ch0_TAKSDvq89NUIElLA
https://twitter.com/MarkVank_
https://www.facebook.com/HardMixOfficial
https://facebook.com/HardMixOfficial
Support HardMix:
https://soundcloud.com/hardmix-ap3x
http://www.instagram.com/mebn2
http://www.youtube.com/VoltiDubstep
http://instagram.com/mebn2
http://youtube.com/VoltiDubstep
Support Eric Rodriguez:
https://soundcloud.com/ericrodriguezofficial
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)
Facebook: https://www.facebook.com/FreeSongsToUse
Facebook: https://facebook.com/FreeSongsToUse
Twitter: https://twitter.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 ==
@ -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?
== 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:
@ -109,13 +106,8 @@ On behalf of the ShiftOS development team, we would love to thank the following
- Philip Adams, a.k.a OSFirstTimer
- 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!

View file

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