Files
Delta-v/Content.Shared/Labels/Components/HandLabelerComponent.cs
beck-thompson 7b66f04a65 Add hand label blacklist (#42986)
* Add blacklist to hand labeler

* Add comments

* Nullable
2026-06-29 12:43:53 +02:00

40 lines
1.1 KiB
C#

using Content.Shared.Labels.EntitySystems;
using Content.Shared.Whitelist;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Labels.Components;
[RegisterComponent, NetworkedComponent]
[Access(typeof(SharedHandLabelerSystem))]
public sealed partial class HandLabelerComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), Access(Other = AccessPermissions.ReadWriteExecute)]
[DataField]
public string AssignedLabel = string.Empty;
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public int MaxLabelChars = 50;
/// <summary>
/// Blacklist for entities that can be labeled.
/// </summary>
[DataField]
public EntityWhitelist? Whitelist;
/// <summary>
/// Blacklist for entities that cannot be labeled.
/// </summary>
[DataField]
public EntityWhitelist? Blacklist;
}
[Serializable, NetSerializable]
public sealed class HandLabelerComponentState(string assignedLabel) : IComponentState
{
public string AssignedLabel = assignedLabel;
public int MaxLabelChars;
}