Made console change text color depending on messages

This commit is contained in:
Twitchy 2011-07-08 23:38:02 +12:00
parent 16a90f3240
commit 1d5ac77255
4 changed files with 14 additions and 1 deletions

View file

@ -70,14 +70,18 @@ namespace TShockAPI
Tools.Broadcast("Server map saving, potential lag spike");
WorldGen.saveWorld();
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("World backed up");
Console.ForegroundColor = ConsoleColor.Gray;
Log.Info(string.Format("World backed up ({0})", Main.worldPathName));
Main.worldPathName = worldname;
}
catch (Exception ex)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Backup failed");
Console.ForegroundColor = ConsoleColor.Gray;
Log.Error("Backup failed");
Log.Error(ex.ToString());
}