mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
40 lines
1.1 KiB
C#
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;
|
|
}
|