Files
tbd-station-14/Content.Shared/NameIdentifier/NameIdentifierComponent.cs
Nemanja 7ddee71379 More borg tweaks (#19143)
* borg tweaks but i'm gonna go code fun stuff first

* werkin' on it

* a ton of tweaks

* fuck everyone and then myself
2023-08-14 18:34:23 -05:00

27 lines
1.0 KiB
C#

using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.NameIdentifier;
/// <summary>
/// Generates a unique numeric identifier for entities, with specifics controlled by a <see cref="NameIdentifierGroupPrototype"/>.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class NameIdentifierComponent : Component
{
[DataField("group", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<NameIdentifierGroupPrototype>))]
public string Group = string.Empty;
/// <summary>
/// The randomly generated ID for this entity.
/// </summary>
[DataField("identifier"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public int Identifier = -1;
/// <summary>
/// The full name identifier for this entity.
/// </summary>
[DataField("fullIdentifier"), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
public string FullIdentifier = string.Empty;
}