CatStation/Content.Shared/Labels/Components/LabelComponent.cs
B_Kirill 90295503da
Fix some missing localization warnings (#44620)
* Fix some missing localization warnings

* New field

* Replace

* Localization

* Integration test

* Update Content.IntegrationTests/Tests/Labels/LabelPrototypeTest.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2026-07-13 16:34:26 -04:00

32 lines
1 KiB
C#

using Content.Shared.Labels.EntitySystems;
using Robust.Shared.GameStates;
namespace Content.Shared.Labels.Components;
/// <summary>
/// Makes entities have a label in their name. Labels are normally given by <see cref="HandLabelerComponent"/>
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(LabelSystem))]
public sealed partial class LabelComponent : Component
{
/// <summary>
/// Current text on the label.
/// Do not use this in entity prototypes - use <see cref="LocalizedLabel"/> instead.
/// </summary>
[DataField, AutoNetworkedField]
public string? CurrentLabel { get; set; }
/// <summary>
/// Localization ID used to set <see cref="CurrentLabel"/> on map init.
/// Use this in entity prototypes.
/// </summary>
[DataField]
public LocId? LocalizedLabel { get; set; }
/// <summary>
/// Should the label show up in the examine menu?
/// </summary>
[DataField, AutoNetworkedField]
public bool Examinable = true;
}