aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-05-01 11:38:32 -0600
committerAShifter <[email protected]>2017-05-01 11:38:32 -0600
commitb842c73b04fb92d9ecaf3d8fcc2df6157c2e8652 (patch)
treeff4979daf8dfd7881899ade68903d757c6e828d4
parent7293e2f07f99603c1f63826d705ce4179d70c663 (diff)
parent12490dec7deaa972cb29166095a7ef0c1f005541 (diff)
downloadshiftos_thereturn-b842c73b04fb92d9ecaf3d8fcc2df6157c2e8652.tar.gz
shiftos_thereturn-b842c73b04fb92d9ecaf3d8fcc2df6157c2e8652.tar.bz2
shiftos_thereturn-b842c73b04fb92d9ecaf3d8fcc2df6157c2e8652.zip
Merge remote-tracking branch 'refs/remotes/shiftos-game/master'
-rw-r--r--ShiftOS.WinForms/Oobe.cs5
-rw-r--r--ShiftOS.WinForms/OobeStory.cs6
-rw-r--r--ShiftOS.WinForms/WindowBorder.cs4
-rw-r--r--ShiftOS_TheReturn/AudioManager.cs3
4 files changed, 17 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs
index 6017d35..309495d 100644
--- a/ShiftOS.WinForms/Oobe.cs
+++ b/ShiftOS.WinForms/Oobe.cs
@@ -261,7 +261,10 @@ You must join the digital society, rise up the ranks, and save us.
{
Utils.Delete(Paths.GetPath("user.dat"));
}
- Application.Restart();
+ string json = Utils.ExportMount(0);
+ System.IO.File.WriteAllText(Paths.SaveFile, json);
+ System.Diagnostics.Process.Start(Application.ExecutablePath);
+ Environment.Exit(0);
}
});
diff --git a/ShiftOS.WinForms/OobeStory.cs b/ShiftOS.WinForms/OobeStory.cs
index d4d066b..ab730e7 100644
--- a/ShiftOS.WinForms/OobeStory.cs
+++ b/ShiftOS.WinForms/OobeStory.cs
@@ -205,7 +205,11 @@ namespace ShiftOS.WinForms
while (position == 0)
Thread.Sleep(10);
Console.WriteLine("Connecting to the multi-user domain as " + SaveSystem.CurrentSave.SystemName + "...");
+ bool connected = false;
+ Engine.AudioManager.PlayCompleted += () => { connected = true; };
Engine.AudioManager.PlayStream(Properties.Resources.dial_up_modem_02);
+ while (connected == false)
+ Thread.Sleep(10);
Console.WriteLine("Connection successful, system spinning up...");
Thread.Sleep(200);
UsernameWait:
@@ -299,6 +303,8 @@ namespace ShiftOS.WinForms
TerminalBackend.PrintPrompt();
Console.Write("sos.help");
TerminalBackend.InvokeCommand("sos.help");
+ Thread.Sleep(1000);
+ TerminalBackend.PrintPrompt();
};
}
});
diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs
index 49298dd..25c7639 100644
--- a/ShiftOS.WinForms/WindowBorder.cs
+++ b/ShiftOS.WinForms/WindowBorder.cs
@@ -257,6 +257,7 @@ namespace ShiftOS.WinForms
{
this.DoubleBuffered = true;
this.TransparencyKey = LoadedSkin.SystemKey;
+ pnlcontents.BackColor = this.TransparencyKey;
pnltitle.Height = LoadedSkin.TitlebarHeight;
pnltitle.BackColor = LoadedSkin.TitleBackgroundColor;
pnltitle.BackgroundImage = GetImage("titlebar");
@@ -504,7 +505,9 @@ namespace ShiftOS.WinForms
private void pnlright_MouseDown(object sender, MouseEventArgs e)
{
if (Shiftorium.UpgradeInstalled("resizable_windows"))
+ {
resizing = true;
+ }
}
private void pnlright_MouseMove(object sender, MouseEventArgs e)
@@ -518,6 +521,7 @@ namespace ShiftOS.WinForms
private void pnlright_MouseUp(object sender, MouseEventArgs e)
{
resizing = false;
+ pnlcontents.Show();
}
private void pnlleft_MouseMove(object sender, MouseEventArgs e)
diff --git a/ShiftOS_TheReturn/AudioManager.cs b/ShiftOS_TheReturn/AudioManager.cs
index d689cad..a636497 100644
--- a/ShiftOS_TheReturn/AudioManager.cs
+++ b/ShiftOS_TheReturn/AudioManager.cs
@@ -87,6 +87,7 @@ namespace ShiftOS.Engine
_out.Init(_reader);
_out.Volume = _provider.Volume;
_out.Play();
+ _out.PlaybackStopped += (o, a) => { PlayCompleted?.Invoke(); };
}
catch { }
}
@@ -107,6 +108,8 @@ namespace ShiftOS.Engine
ShiftOS.Engine.AudioManager.Play("snd.wav");
}
+
+ public static event Action PlayCompleted;
}
public interface IAudioProvider