diff options
| author | Michael <[email protected]> | 2017-02-05 11:15:50 -0500 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-02-05 11:15:50 -0500 |
| commit | e2f25a92ba34aacc7e7d1f0ccde75d3873d68535 (patch) | |
| tree | 259142e21278ddfd0e6636db3e4b9f97b14cb694 /ShiftOS_TheReturn | |
| parent | ae7553fa95bd78178c02fac11cf33ea8e0d69cfb (diff) | |
| download | shiftos_thereturn-e2f25a92ba34aacc7e7d1f0ccde75d3873d68535.tar.gz shiftos_thereturn-e2f25a92ba34aacc7e7d1f0ccde75d3873d68535.tar.bz2 shiftos_thereturn-e2f25a92ba34aacc7e7d1f0ccde75d3873d68535.zip | |
Fix tutorial reboot
Diffstat (limited to 'ShiftOS_TheReturn')
| -rw-r--r-- | ShiftOS_TheReturn/SaveSystem.cs | 20 |
1 files changed, 11 insertions, 9 deletions
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)); } |
