Unstable 0.17.0.0
This commit is contained in:
@@ -10,23 +10,20 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
private struct LogMessage
|
||||
{
|
||||
public readonly string Text;
|
||||
public readonly string SanitizedText;
|
||||
public readonly RichString Text;
|
||||
public readonly MessageType Type;
|
||||
public readonly List<RichTextData> RichData;
|
||||
|
||||
public LogMessage(string text, MessageType type)
|
||||
{
|
||||
if (type.HasFlag(MessageType.Chat))
|
||||
{
|
||||
Text = $"[{DateTime.Now}]\n {text}";
|
||||
text = $"[{DateTime.Now}]\n {text}";
|
||||
}
|
||||
else
|
||||
{
|
||||
Text = $"[{DateTime.Now}]\n {TextManager.GetServerMessage(text)}";
|
||||
text = $"[{DateTime.Now}]\n {TextManager.GetServerMessage(text)}";
|
||||
}
|
||||
RichData = RichTextData.GetRichTextData(Text, out SanitizedText);
|
||||
|
||||
Text = RichString.Rich(text);
|
||||
Type = type;
|
||||
}
|
||||
}
|
||||
@@ -113,7 +110,7 @@ namespace Barotrauma.Networking
|
||||
var newText = new LogMessage(line, messageType);
|
||||
|
||||
#if SERVER
|
||||
DebugConsole.NewMessage(newText.SanitizedText, messageColor[messageType]); //TODO: REMOVE
|
||||
DebugConsole.NewMessage(newText.Text.SanitizedValue, messageColor[messageType]); //TODO: REMOVE
|
||||
#endif
|
||||
|
||||
lines.Enqueue(newText);
|
||||
@@ -173,7 +170,7 @@ namespace Barotrauma.Networking
|
||||
|
||||
try
|
||||
{
|
||||
File.WriteAllLines(filePath, unsavedLines.Select(l => l.SanitizedText));
|
||||
File.WriteAllLines(filePath, unsavedLines.Select(l => l.Text.SanitizedValue));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user