aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS_TheReturn')
-rw-r--r--ShiftOS_TheReturn/App.config10
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs15
-rw-r--r--ShiftOS_TheReturn/ShiftOS.Engine.csproj1
-rw-r--r--ShiftOS_TheReturn/TutorialManager.cs33
4 files changed, 56 insertions, 3 deletions
diff --git a/ShiftOS_TheReturn/App.config b/ShiftOS_TheReturn/App.config
index cf88e98..efb416e 100644
--- a/ShiftOS_TheReturn/App.config
+++ b/ShiftOS_TheReturn/App.config
@@ -1,9 +1,15 @@
-<?xml version="1.0" encoding="utf-8" ?>
+<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
- <loadFromRemoteSources enabled="true"/>
+ <loadFromRemoteSources enabled="true" />
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
+ </dependentAssembly>
+ </assemblyBinding>
</runtime>
</configuration> \ No newline at end of file
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index 537b14e..4b5312a 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -149,11 +149,24 @@ namespace ShiftOS.Engine
Shiftorium.Init();
- while (CurrentSave.StoryPosition < 5)
+ while (CurrentSave.StoryPosition < 1)
{
}
+ if(CurrentSave.StoryPosition == 1)
+ {
+ Desktop.InvokeOnWorkerThread(new Action(() =>
+ {
+ TutorialManager.StartTutorial();
+ }));
+
+ while(CurrentSave.StoryPosition < 2)
+ {
+
+ }
+ }
+
Thread.Sleep(75);
diff --git a/ShiftOS_TheReturn/ShiftOS.Engine.csproj b/ShiftOS_TheReturn/ShiftOS.Engine.csproj
index a88b3d9..30bd703 100644
--- a/ShiftOS_TheReturn/ShiftOS.Engine.csproj
+++ b/ShiftOS_TheReturn/ShiftOS.Engine.csproj
@@ -163,6 +163,7 @@
<Compile Include="Story.cs" />
<Compile Include="TerminalBackend.cs" />
<Compile Include="TerminalTextWriter.cs" />
+ <Compile Include="TutorialManager.cs" />
<Compile Include="VirusEngine.cs" />
<Compile Include="WinOpenAttribute.cs" />
<EmbeddedResource Include="AltTabWindow.resx">
diff --git a/ShiftOS_TheReturn/TutorialManager.cs b/ShiftOS_TheReturn/TutorialManager.cs
new file mode 100644
index 0000000..1d8943e
--- /dev/null
+++ b/ShiftOS_TheReturn/TutorialManager.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ShiftOS.Engine
+{
+ public static class TutorialManager
+ {
+ private static ITutorial _tut = null;
+
+ public static void RegisterTutorial(ITutorial tut)
+ {
+ _tut = tut;
+ _tut.OnComplete += (o, a) =>
+ {
+ SaveSystem.CurrentSave.StoryPosition = 2;
+ };
+ }
+
+ public static void StartTutorial()
+ {
+ _tut.Start();
+ }
+ }
+
+ public interface ITutorial
+ {
+ void Start();
+ event EventHandler OnComplete;
+ }
+}