aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ShiftOS.WinForms/Oobe.cs5
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs20
2 files changed, 15 insertions, 10 deletions
diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs
index 14125dc..55aab7e 100644
--- a/ShiftOS.WinForms/Oobe.cs
+++ b/ShiftOS.WinForms/Oobe.cs
@@ -197,7 +197,10 @@ namespace ShiftOS.WinForms
}));
SaveSystem.SaveGame();
Thread.Sleep(5000);
- SaveSystem.Restart();
+ this.Invoke(new Action(() =>
+ {
+ TutorialManager.StartTutorial();
+ }));
}));
this.Show();
this.BringToFront();
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index 284c8d6..2e9f9c1 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -286,20 +286,22 @@ namespace ShiftOS.Engine
Console.WriteLine("");
if(!Shiftorium.Silent)
Console.Write("{SE_SAVING}... ");
-
- string username = CurrentSave.Username;
- string password = CurrentSave.Password;
-
- if (!Utils.FileExists(Paths.GetPath("user.dat")))
+ if (SaveSystem.CurrentSave != null)
{
- Utils.WriteAllText(Paths.GetPath("user.dat"), $@"{{
+ string username = CurrentSave.Username;
+ string password = CurrentSave.Password;
+
+ if (!Utils.FileExists(Paths.GetPath("user.dat")))
+ {
+ Utils.WriteAllText(Paths.GetPath("user.dat"), $@"{{
username: ""{username}"",
password: ""{password}""
}}");
- }
+ }
- ServerManager.SendMessage("mud_save", JsonConvert.SerializeObject(CurrentSave, Formatting.Indented));
- if(!Shiftorium.Silent)
+ ServerManager.SendMessage("mud_save", JsonConvert.SerializeObject(CurrentSave, Formatting.Indented));
+ }
+ if (!Shiftorium.Silent)
Console.WriteLine(" ...{DONE}.");
System.IO.File.WriteAllText(Paths.SaveFile, Utils.ExportMount(0));
}