CatStation/Content.Shared/Codewords/RoleCodewordComponent.cs
Princess Cheeseballs 09b80ab993
Make codewords mind role based (#46167)
* make codewords mind role based

* whoop
2026-09-30 06:53:09 +00:00

40 lines
1 KiB
C#

using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Codewords;
/// <summary>
/// Used to display and highlight codewords in chat messages on the client.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(CodewordSystem), Other = AccessPermissions.Read)]
public sealed partial class RoleCodewordComponent : Component
{
/// <summary>
/// Contains the codewords tied to a role.
/// Key string should be unique for the role.
/// </summary>
[DataField, AutoNetworkedField]
public CodewordsData RoleCodewords;
}
[DataDefinition, Serializable, NetSerializable]
public partial struct CodewordsData
{
/// <summary>
/// The Color these codewords appear as
/// </summary>
[DataField]
public Color Color;
/// <summary>
/// The Codewords!!!
/// </summary>
[DataField]
public List<string> Codewords;
public CodewordsData(Color color, List<string> codewords)
{
Color = color;
Codewords = codewords;
}
}