mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
fix mud.connect deadlock
This commit is contained in:
parent
dad61e325c
commit
01420ff329
4 changed files with 35 additions and 29 deletions
|
@ -158,8 +158,7 @@ namespace ShiftOS.WinForms
|
|||
int tutPos = 0;
|
||||
Action ondec = () =>
|
||||
{
|
||||
if (tutPos == 2)
|
||||
tutPos++;
|
||||
tutPos++;
|
||||
};
|
||||
TerminalBackend.CommandProcessed += (o, a) =>
|
||||
{
|
||||
|
|
|
@ -156,6 +156,8 @@ namespace ShiftOS.Engine
|
|||
{
|
||||
Console.WriteLine("{ERROR}: " + ex.Message);
|
||||
}
|
||||
|
||||
TerminalBackend.PrefixEnabled = false;
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -125,6 +125,8 @@ namespace ShiftOS.Engine
|
|||
{
|
||||
thisGuid = new Guid(msg.Contents);
|
||||
GUIDReceived?.Invoke(msg.Contents);
|
||||
TerminalBackend.PrefixEnabled = true;
|
||||
TerminalBackend.PrintPrompt();
|
||||
}
|
||||
else if(msg.Name == "allusers")
|
||||
{
|
||||
|
|
|
@ -339,35 +339,38 @@ namespace ShiftOS.Engine
|
|||
|
||||
public static void PrintPrompt()
|
||||
{
|
||||
ConsoleEx.BackgroundColor = SkinEngine.LoadedSkin.TerminalBackColorCC;
|
||||
ConsoleEx.Italic = false;
|
||||
ConsoleEx.Underline = false;
|
||||
if (SaveSystem.CurrentSave != null)
|
||||
{
|
||||
ConsoleEx.BackgroundColor = SkinEngine.LoadedSkin.TerminalBackColorCC;
|
||||
ConsoleEx.Italic = false;
|
||||
ConsoleEx.Underline = false;
|
||||
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Magenta;
|
||||
ConsoleEx.Bold = true;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Magenta;
|
||||
ConsoleEx.Bold = true;
|
||||
|
||||
Console.Write(SaveSystem.CurrentSave.Username);
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.Write("@");
|
||||
ConsoleEx.Italic = true;
|
||||
ConsoleEx.Bold = true;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.Write(SaveSystem.CurrentSave.SystemName);
|
||||
ConsoleEx.Italic = false;
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.Write(":~");
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
ConsoleEx.Italic = true;
|
||||
if (KernelWatchdog.InKernelMode == true)
|
||||
Console.Write("#");
|
||||
else
|
||||
Console.Write("$");
|
||||
ConsoleEx.Italic = false;
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.ForegroundColor = SkinEngine.LoadedSkin.TerminalForeColorCC;
|
||||
Console.Write(" ");
|
||||
Console.Write(SaveSystem.CurrentSave.Username);
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.Write("@");
|
||||
ConsoleEx.Italic = true;
|
||||
ConsoleEx.Bold = true;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.Write(SaveSystem.CurrentSave.SystemName);
|
||||
ConsoleEx.Italic = false;
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.ForegroundColor = ConsoleColor.Gray;
|
||||
Console.Write(":~");
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
ConsoleEx.Italic = true;
|
||||
if (KernelWatchdog.InKernelMode == true)
|
||||
Console.Write("#");
|
||||
else
|
||||
Console.Write("$");
|
||||
ConsoleEx.Italic = false;
|
||||
ConsoleEx.Bold = false;
|
||||
ConsoleEx.ForegroundColor = SkinEngine.LoadedSkin.TerminalForeColorCC;
|
||||
Console.Write(" ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue