Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

66
Scripts/Misc/Timestamp.cs Normal file
View File

@@ -0,0 +1,66 @@
using System;
using System.IO;
using System.Text;
namespace System
{
public class ConsoleHook : TextWriter
{
#if DEBUG
private static readonly bool _Enabled = false;
#else
private static readonly bool _Enabled = true;
#endif
private static Stream m_OldOutput;
private static bool m_Newline;
public override Encoding Encoding
{
get
{
return Encoding.ASCII;
}
}
private string Timestamp
{
get
{
return String.Format("{0:D2}:{1:D2}:{2:D2} ", DateTime.UtcNow.Hour, DateTime.UtcNow.Minute, DateTime.UtcNow.Second);
}
}
public static void Initialize()
{
if (_Enabled)
{
m_OldOutput = Console.OpenStandardOutput();
Console.SetOut(new ConsoleHook());
m_Newline = true;
}
}
public override void WriteLine(string value)
{
if (m_Newline)
{
value = this.Timestamp + value;
}
byte[] data = this.Encoding.GetBytes(value);
m_OldOutput.Write(data, 0, data.Length);
m_OldOutput.WriteByte(10);
m_Newline = true;
}
public override void Write(string value)
{
if (m_Newline)
{
value = this.Timestamp + value;
}
byte[] data = this.Encoding.GetBytes(value);
m_OldOutput.Write(data, 0, data.Length);
m_Newline = false;
}
}
}