aboutsummaryrefslogtreecommitdiff
path: root/PortEngine
diff options
context:
space:
mode:
authorTrey <32907415+TheEdgeNK@users.noreply.github.com>2018-09-02 11:56:23 -0400
committerTrey <32907415+TheEdgeNK@users.noreply.github.com>2018-09-02 11:56:23 -0400
commitcf72b65769809ac77331414aee299112b9bf4b37 (patch)
tree9fb9fdfe01967db9c95b87cb96b7294b43ff455d /PortEngine
parent52376ce623346e257c2b7845d0d2414e7653a6dd (diff)
downloadProject-Silicon-cf72b65769809ac77331414aee299112b9bf4b37.tar.gz
Project-Silicon-cf72b65769809ac77331414aee299112b9bf4b37.tar.bz2
Project-Silicon-cf72b65769809ac77331414aee299112b9bf4b37.zip
WE FIXED THE STORYLINE!!!
Diffstat (limited to 'PortEngine')
-rw-r--r--PortEngine/GeneralAPI.cs8
-rw-r--r--PortEngine/PortsTerminalAPI.cs17
-rw-r--r--PortEngine/Properties/Settings.Designer.cs32
-rw-r--r--PortEngine/Properties/Settings.settings16
-rw-r--r--PortEngine/StorylineAPI.cs20
-rw-r--r--PortEngine/app.config10
6 files changed, 42 insertions, 61 deletions
diff --git a/PortEngine/GeneralAPI.cs b/PortEngine/GeneralAPI.cs
index 6ba9769..174b8d6 100644
--- a/PortEngine/GeneralAPI.cs
+++ b/PortEngine/GeneralAPI.cs
@@ -29,6 +29,14 @@ namespace PortEngine
public class GeneralAPI
{
+ public static float ChatterStorylineState = Properties.Settings.Default.chatterStorylineStatus;
+ public static float HijackStorylineState = Properties.Settings.Default.hijackStorylineStatus;
+ public static int PlayerBalance = Properties.Settings.Default.userBalance;
+ public static string PlayerName = Properties.Settings.Default.userDisplayName;
+ public static int PlayerSecurityLevel = Properties.Settings.Default.userSecurityLevel;
+ public static float PlayerPowerLevel = Properties.Settings.Default.userPowerLevel;
+
+
public static void appendUsername(Label txtUserDestination)
{
txtUserDestination.Text = Properties.Settings.Default.userDisplayName;
diff --git a/PortEngine/PortsTerminalAPI.cs b/PortEngine/PortsTerminalAPI.cs
index b41bd2c..ba59409 100644
--- a/PortEngine/PortsTerminalAPI.cs
+++ b/PortEngine/PortsTerminalAPI.cs
@@ -28,30 +28,17 @@ namespace PortEngine
switch (pendingCommand)
{
case "help":
- Console.WriteLine("help - lists the commands\r\ntest - displays a test message\r\nclear - clears the terminal\r\nchangeusername - changes your username for use with the Chatter application\r\n example: changeusername --TheBestUser" + Environment.NewLine);
-
+ Console.WriteLine("help - lists the commands\r\ntest - displays a test message\r\nclear - clears the terminal" + Environment.NewLine);
break;
case "clear":
Console.Clear();
LastCommandWasClear = true;
-
break;
case "test":
Console.WriteLine("This is a test!\r\nof the EBS!" + Environment.NewLine);
-
- break;
-
+ break;
default:
- if (pendingCommand.StartsWith("changeusername --"))
- {
- Console.WriteLine("Changed username.");
- Properties.Settings.Default.userDisplayName = pendingCommand.Substring(17);
- break;
- }
- else
- {
Console.WriteLine("Syntax error. Reference the command list for commands that exist." + Environment.NewLine);
- }
break;
}
diff --git a/PortEngine/Properties/Settings.Designer.cs b/PortEngine/Properties/Settings.Designer.cs
index 5e4656a..16d531b 100644
--- a/PortEngine/Properties/Settings.Designer.cs
+++ b/PortEngine/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace PortEngine.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@@ -59,9 +59,9 @@ namespace PortEngine.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
- public string userSecurityLevel {
+ public int userSecurityLevel {
get {
- return ((string)(this["userSecurityLevel"]));
+ return ((int)(this["userSecurityLevel"]));
}
set {
this["userSecurityLevel"] = value;
@@ -71,9 +71,9 @@ namespace PortEngine.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1")]
- public string userPowerLevel {
+ public int userPowerLevel {
get {
- return ((string)(this["userPowerLevel"]));
+ return ((int)(this["userPowerLevel"]));
}
set {
this["userPowerLevel"] = value;
@@ -82,10 +82,10 @@ namespace PortEngine.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool storylineStatus {
+ [global::System.Configuration.DefaultSettingValueAttribute("1")]
+ public float storylineStatus {
get {
- return ((bool)(this["storylineStatus"]));
+ return ((float)(this["storylineStatus"]));
}
set {
this["storylineStatus"] = value;
@@ -94,25 +94,25 @@ namespace PortEngine.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool hijack1EventCompleted {
+ [global::System.Configuration.DefaultSettingValueAttribute("1")]
+ public float hijackStorylineStatus {
get {
- return ((bool)(this["hijack1EventCompleted"]));
+ return ((float)(this["hijackStorylineStatus"]));
}
set {
- this["hijack1EventCompleted"] = value;
+ this["hijackStorylineStatus"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("False")]
- public bool chatter1EventCompleted {
+ [global::System.Configuration.DefaultSettingValueAttribute("1")]
+ public float chatterStorylineStatus {
get {
- return ((bool)(this["chatter1EventCompleted"]));
+ return ((float)(this["chatterStorylineStatus"]));
}
set {
- this["chatter1EventCompleted"] = value;
+ this["chatterStorylineStatus"] = value;
}
}
}
diff --git a/PortEngine/Properties/Settings.settings b/PortEngine/Properties/Settings.settings
index 100f3c4..61f2593 100644
--- a/PortEngine/Properties/Settings.settings
+++ b/PortEngine/Properties/Settings.settings
@@ -11,20 +11,20 @@
<Setting Name="userBalance" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
- <Setting Name="userSecurityLevel" Type="System.String" Scope="User">
+ <Setting Name="userSecurityLevel" Type="System.Int32" Scope="User">
<Value Profile="(Default)">1</Value>
</Setting>
- <Setting Name="userPowerLevel" Type="System.String" Scope="User">
+ <Setting Name="userPowerLevel" Type="System.Int32" Scope="User">
<Value Profile="(Default)">1</Value>
</Setting>
- <Setting Name="storylineStatus" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">True</Value>
+ <Setting Name="storylineStatus" Type="System.Single" Scope="User">
+ <Value Profile="(Default)">1</Value>
</Setting>
- <Setting Name="hijack1EventCompleted" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">False</Value>
+ <Setting Name="hijackStorylineStatus" Type="System.Single" Scope="User">
+ <Value Profile="(Default)">1</Value>
</Setting>
- <Setting Name="chatter1EventCompleted" Type="System.Boolean" Scope="User">
- <Value Profile="(Default)">False</Value>
+ <Setting Name="chatterStorylineStatus" Type="System.Single" Scope="User">
+ <Value Profile="(Default)">1</Value>
</Setting>
</Settings>
</SettingsFile> \ No newline at end of file
diff --git a/PortEngine/StorylineAPI.cs b/PortEngine/StorylineAPI.cs
index db03baf..a109c8b 100644
--- a/PortEngine/StorylineAPI.cs
+++ b/PortEngine/StorylineAPI.cs
@@ -30,20 +30,10 @@ namespace PortEngine
{
public class StorylineAPI
{
- public static bool StorylineStatus = Properties.Settings.Default.storylineStatus;
- public static bool IsHijack1Completed = Properties.Settings.Default.hijack1EventCompleted;
- public static bool IsChatter1Completed = Properties.Settings.Default.chatter1EventCompleted;
- public static string PlayerDisplayName = Properties.Settings.Default.userDisplayName;
- static BackgroundWorker WorkerBee = new BackgroundWorker();
-
- public static void StorylineState(bool IsStorylineEnabled)
- {
- StorylineStatus = IsStorylineEnabled;
- }
public static void StartHijackEvent1(TextBox txtHijack1)
{
- if (IsHijack1Completed == false)
+ if (GeneralAPI.HijackStorylineState == 1)
{
Thread.Sleep(2000);
txtHijack1.AppendText("PortOS is now booting..." + Environment.NewLine);
@@ -121,7 +111,7 @@ namespace PortEngine
public static void StartChatterEvent1(TextBox txtSentMessageDump)
{
- if (IsChatter1Completed == false)
+ if (GeneralAPI.ChatterStorylineState == 1)
{
txtSentMessageDump.AppendText("Adam has entered the channel..." + Environment.NewLine);
Thread.Sleep(2000);
@@ -133,7 +123,7 @@ namespace PortEngine
Thread.Sleep(10000);
txtSentMessageDump.AppendText("<Adam> Great!" + Environment.NewLine);
Thread.Sleep(2000);
- txtSentMessageDump.AppendText("<Adam> Hello, " + PlayerDisplayName + Environment.NewLine);
+ txtSentMessageDump.AppendText("<Adam> Hello, " + GeneralAPI.PlayerName + Environment.NewLine);
Thread.Sleep(2000);
txtSentMessageDump.AppendText("<Adam> If you open your app launcher, there is an application called the 'QuantumNet Browser'" + Environment.NewLine);
Thread.Sleep(2000);
@@ -161,10 +151,6 @@ namespace PortEngine
Thread.Sleep(2000);
txtSentMessageDump.AppendText("Adam has disconnected from the channel. " + Environment.NewLine);
}
- else
- {
- txtSentMessageDump.AppendText(PlayerDisplayName + " has entered the channel!");
- }
}
diff --git a/PortEngine/app.config b/PortEngine/app.config
index 62af220..8d3e43f 100644
--- a/PortEngine/app.config
+++ b/PortEngine/app.config
@@ -23,13 +23,13 @@
<value>1</value>
</setting>
<setting name="storylineStatus" serializeAs="String">
- <value>True</value>
+ <value>1</value>
</setting>
- <setting name="hijack1EventCompleted" serializeAs="String">
- <value>False</value>
+ <setting name="hijackStorylineStatus" serializeAs="String">
+ <value>1</value>
</setting>
- <setting name="chatter1EventCompleted" serializeAs="String">
- <value>False</value>
+ <setting name="chatterStorylineStatus" serializeAs="String">
+ <value>1</value>
</setting>
</PortEngine.Properties.Settings>
</userSettings>