diff options
| author | Michael <[email protected]> | 2017-04-17 16:10:29 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-17 16:10:29 -0400 |
| commit | df3e933c7d37397e9885faa60f2d7fc06e10d5cc (patch) | |
| tree | 42ba87f5e64514e81e395f2cdc2a41032f19eabe /ShiftOS.WinForms | |
| parent | d4daa694e114db7c3306cb631e5e7f929f7f2fad (diff) | |
| download | shiftos_thereturn-df3e933c7d37397e9885faa60f2d7fc06e10d5cc.tar.gz shiftos_thereturn-df3e933c7d37397e9885faa60f2d7fc06e10d5cc.tar.bz2 shiftos_thereturn-df3e933c7d37397e9885faa60f2d7fc06e10d5cc.zip | |
more oobe things
Diffstat (limited to 'ShiftOS.WinForms')
| -rw-r--r-- | ShiftOS.WinForms/OobeStory.cs | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/ShiftOS.WinForms/OobeStory.cs b/ShiftOS.WinForms/OobeStory.cs index 68e2a7b..b0ecb3c 100644 --- a/ShiftOS.WinForms/OobeStory.cs +++ b/ShiftOS.WinForms/OobeStory.cs @@ -193,12 +193,14 @@ namespace ShiftOS.WinForms Engine.AudioManager.PlayStream(Properties.Resources.dial_up_modem_02); Console.WriteLine("Connection successful, system spinning up..."); Thread.Sleep(200); + UsernameWait: Console.WriteLine("No users associated with this system. Please enter a username."); Console.WriteLine(" - If the username is registered as a digital being, you will be prompted for your password. Else, you will be prompted to create a new account."); while(position == 1) { Thread.Sleep(10); } + bool goBack = false; int incorrectChances = 2; Console.WriteLine("Checking sentience records..."); ServerManager.MessageReceived += (msg) => @@ -239,13 +241,14 @@ namespace ShiftOS.WinForms { Console.WriteLine("Access denied."); position = 2; + goBack = true; } } } } }; ServerManager.SendMessage("mud_checkuserexists", JsonConvert.SerializeObject(new { username = SaveSystem.CurrentSave.Username })); - while(position == 2) + while (position == 2) { Thread.Sleep(10); } @@ -253,22 +256,33 @@ namespace ShiftOS.WinForms { Thread.Sleep(10); } + if (goBack) + goto UsernameWait; Console.WriteLine("Sentience linkup successful."); Console.WriteLine("We will bring you to your system in 5 seconds."); Thread.Sleep(5000); Desktop.InvokeOnWorkerThread(() => { - var lst = new List<Form>(); - foreach (Form frm in Application.OpenForms) - lst.Add(frm); - lst.ForEach((frm) => + SaveSystem.CurrentSave.StoryPosition = 3; + SaveSystem.SaveGame(); + while (!Shiftorium.IsInitiated) { - if (!(frm is WinformsDesktop)) - frm.Close(); - }); - TerminalBackend.PrefixEnabled = true; - - AppearanceManager.SetupWindow(new Applications.Terminal()); + Thread.Sleep(10); + } + if (!Shiftorium.UpgradeInstalled("desktop")) + { + term.ClearText(); + TerminalBackend.PrintPrompt(); + Console.Write("sos.status"); + TerminalBackend.InvokeCommand("sos.status"); + TerminalBackend.PrintPrompt(); + Console.Write("sos.help"); + TerminalBackend.InvokeCommand("sos.help"); + } + else + { + AppearanceManager.Close(term); + } }); } private static bool isValid(string text, string chars) |
