mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* 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>
32 lines
1 KiB
C#
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;
|
|
}
|