mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
Fix tutorial reboot
This commit is contained in:
parent
ae7553fa95
commit
e2f25a92ba
2 changed files with 15 additions and 10 deletions
|
@ -197,7 +197,10 @@ namespace ShiftOS.WinForms
|
|||
}));
|
||||
SaveSystem.SaveGame();
|
||||
Thread.Sleep(5000);
|
||||
SaveSystem.Restart();
|
||||
this.Invoke(new Action(() =>
|
||||
{
|
||||
TutorialManager.StartTutorial();
|
||||
}));
|
||||
}));
|
||||
this.Show();
|
||||
this.BringToFront();
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue