aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/SaveSystem.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-06-10 12:58:09 -0400
committerMichael <[email protected]>2017-06-10 12:58:09 -0400
commit920e33a2fd329ccbdfeb38ddedd0b4d87e97ed86 (patch)
treefdd711c135c0fa9b347ba019cfc44a2208dbad50 /ShiftOS_TheReturn/SaveSystem.cs
parentc40d071d58859e25b3781299b949b91caa0548fe (diff)
downloadshiftos_thereturn-920e33a2fd329ccbdfeb38ddedd0b4d87e97ed86.tar.gz
shiftos_thereturn-920e33a2fd329ccbdfeb38ddedd0b4d87e97ed86.tar.bz2
shiftos_thereturn-920e33a2fd329ccbdfeb38ddedd0b4d87e97ed86.zip
Fix Shiftorium init bug.
Diffstat (limited to 'ShiftOS_TheReturn/SaveSystem.cs')
-rw-r--r--ShiftOS_TheReturn/SaveSystem.cs41
1 files changed, 23 insertions, 18 deletions
diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs
index e36fee6..c5a6a51 100644
--- a/ShiftOS_TheReturn/SaveSystem.cs
+++ b/ShiftOS_TheReturn/SaveSystem.cs
@@ -307,6 +307,8 @@ namespace ShiftOS.Engine
Thread.Sleep(10);
}
+ Shiftorium.Init();
+
while (CurrentSave.StoryPosition < 1)
{
Thread.Sleep(10);
@@ -633,27 +635,30 @@ namespace ShiftOS.Engine
/// </summary>
public static void SaveGame()
{
-#if !NOSAVE
- if(!Shiftorium.Silent)
- Console.WriteLine("");
- if(!Shiftorium.Silent)
- Console.Write("{SE_SAVING}... ");
- if (SaveSystem.CurrentSave != null)
+ if (IsSandbox == false)
{
- Utils.WriteAllText(Paths.GetPath("user.dat"), CurrentSave.UniteAuthToken);
- var serialisedSaveFile = JsonConvert.SerializeObject(CurrentSave, Formatting.Indented);
- new Thread(() =>
+#if !NOSAVE
+ if (!Shiftorium.Silent)
+ Console.WriteLine("");
+ if (!Shiftorium.Silent)
+ Console.Write("{SE_SAVING}... ");
+ if (SaveSystem.CurrentSave != null)
{
- // please don't do networking on the main thread if you're just going to
- // discard the response, it's extremely slow
- ServerManager.SendMessage("mud_save", serialisedSaveFile);
- })
- { IsBackground = false }.Start();
- }
- if (!Shiftorium.Silent)
- Console.WriteLine(" ...{DONE}.");
- System.IO.File.WriteAllText(Paths.SaveFile, Utils.ExportMount(0));
+ Utils.WriteAllText(Paths.GetPath("user.dat"), CurrentSave.UniteAuthToken);
+ var serialisedSaveFile = JsonConvert.SerializeObject(CurrentSave, Formatting.Indented);
+ new Thread(() =>
+ {
+ // please don't do networking on the main thread if you're just going to
+ // discard the response, it's extremely slow
+ ServerManager.SendMessage("mud_save", serialisedSaveFile);
+ })
+ { IsBackground = false }.Start();
+ }
+ if (!Shiftorium.Silent)
+ Console.WriteLine(" ...{DONE}.");
+ System.IO.File.WriteAllText(Paths.SaveFile, Utils.ExportMount(0));
#endif
+ }
}
/// <summary>