Files
tbd-station-14/Content.Client/Chat/StoredChatMessage.cs
tentekal 92668432a7 Chat Filter using Flag Enums. (#270)
* Backing up local repo before upgrading OS, minor work on chat UI

* Cleaned out unnecessary modded files

* Got a working version of filter toggles based on flag enums

* Added localization to chatbox buttons

* Should actually fix modified proj files, thanks PJB

* Fixed enum operators to unset instead of toggle

* Added a local client class for storing net message details

* Reworked RepopulateChat to pull from a StoredChatMessage list

* Fixed messages dissapearing

* Re-ordered logic to be a bit more efficient with re-drawing chat
2019-07-18 23:32:48 +02:00

49 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using Content.Client.Interfaces.Chat;
using Content.Shared.Chat;
using Robust.Client.Console;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Utility;
using Robust.Client.UserInterface.Controls;
namespace Content.Client.Chat
{
public class StoredChatMessage
{
// TODO Make me reflected with respect to MsgChatMessage
/// <summary>
/// Client's own copies of chat messages used in filtering locally
/// </summary>
/// <summary>
/// Actual Message contents, i.e. words
/// </summary>
public string Message { get; set; }
/// <summary>
/// Message channel, used for filtering
/// </summary>
public ChatChannel Channel { get; set; }
/// <summary>
/// What to "wrap" the message contents with. Example is stuff like 'Joe says: "{0}"'
/// </summary>
public string MessageWrap { get; set; }
public StoredChatMessage(MsgChatMessage netMsg)
{
/// <summary>
/// Constructor to copy a net message into stored client variety
/// </summary>
Message = netMsg.Message;
Channel = netMsg.Channel;
MessageWrap = netMsg.MessageWrap;
}
}
}