Mind my language...

We finally fixed the god damn fucking fuckity fucking Tutorial bug.
Finally, for fucks sake.
This commit is contained in:
Michael 2017-02-08 11:20:02 -05:00
parent 530d34e1ae
commit 512a02ba88
5 changed files with 20 additions and 21 deletions

View file

@ -348,6 +348,7 @@ So make sure your password is secure enough that it can't be guessed, but easy f
ShiftOS.Objects.ShiftFS.Utils.Delete(Paths.GetPath("user.dat"));
System.IO.File.WriteAllText(Paths.SaveFile, ShiftOS.Objects.ShiftFS.Utils.ExportMount(0));
SaveSystem.NewSave();
this.CanClose = true;
this.Close();
}
}

View file

@ -199,6 +199,8 @@ namespace ShiftOS.WinForms
TextType("I have been installing ShiftOS on your system in the background as I was talking with you. Before I can set you free, I need to give you a tutorial on how to use the system.");
Thread.Sleep(500);
TextType("I will reboot your system in Tutorial Mode now. Complete the tutorial, and you shall be on your way.");
Thread.Sleep(3000);
SaveSystem.CurrentSave = MySave;
SaveSystem.CurrentSave.StoryPosition = 1;
Utils.WriteAllText(Paths.GetPath("user.dat"), JsonConvert.SerializeObject(new
@ -207,18 +209,10 @@ namespace ShiftOS.WinForms
password = MySave.Password
}));
Shiftorium.Silent = true;
SaveSystem.SaveGame();
Thread.Sleep(3000);
try {
TutorialManager.StartTutorial();
} catch (Exception e) {
TextType("An error has occoured while starting the tutorial");
TextType(e.ToString());
}
//this.Close(); // This has been commented out because the form closes when the error appears. Uncomment this if no more errors appear
SaveSystem.SaveGame(); //Yknow, just incase it crashes.
this.Invoke(new Action(this.Close));
}
catch(Exception e)
catch (Exception e)
{
TextType("I have experienced an error.");
TextType(e.ToString());

View file

@ -99,7 +99,7 @@ namespace ShiftOS.WinForms
};
time.Tick += (o, a) =>
{
if (SaveSystem.CurrentSave != null)
if (SaveSystem.CurrentSave != null && TutorialManager.IsInTutorial == false)
{
lbtime.Text = Applications.Terminal.GetTime();
lbtime.Left = desktoppanel.Width - lbtime.Width - LoadedSkin.DesktopPanelClockFromRight.X;

View file

@ -176,24 +176,27 @@ namespace ShiftOS.Engine
Console.WriteLine(" ...{DONE}.");
}
Story.Start();
Thread.Sleep(50);
Console.WriteLine("{SYSTEM_INITIATED}");
TerminalBackend.InStory = false;
TerminalBackend.PrefixEnabled = true;
Shiftorium.LogOrphanedUpgrades = true;
Desktop.InvokeOnWorkerThread(new Action(() => Desktop.PopulateAppLauncher()));
GameReady?.Invoke();
if (CurrentSave.StoryPosition == 1)
{
Desktop.InvokeOnWorkerThread(new Action(() =>
{
TutorialManager.StartTutorial();
}));
while(TutorialManager.IsInTutorial == true) { }
GameReady?.Invoke();
}
else
{
GameReady?.Invoke();
}
}));
thread.IsBackground = true;
thread.Start();

View file

@ -122,11 +122,14 @@ namespace ShiftOS.Engine
return true;
}
public static bool IsInitiated { get; private set; }
public static void Init()
{
try
if (IsInitiated == false)
{
IsInitiated = true;
//Let the crash handler deal with this one...
var dict = GetDefaults();
foreach (var itm in dict)
{
@ -136,9 +139,7 @@ namespace ShiftOS.Engine
}
}
}
catch
{
}
}
public static int GetCPValue(string id)