mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-04 05:17:28 +00:00
* AI? Being able to send faxes? Perish the thought. * Update Resources/Prototypes/Entities/Mobs/Player/silicon.yml Signed-off-by: Vanessa <908648+ShepardToTheStars@users.noreply.github.com> --------- Signed-off-by: Vanessa <908648+ShepardToTheStars@users.noreply.github.com> Co-authored-by: Vanessa <908648+ShepardToTheStars@users.noreply.github.com>
18 lines
458 B
C#
18 lines
458 B
C#
using Content.Shared.Labels.Components;
|
|
|
|
namespace Content.Client._DV.Silicons;
|
|
|
|
public static class NameHelpers
|
|
{
|
|
extension(IEntityManager self)
|
|
{
|
|
public string PaperName(EntityUid paper)
|
|
{
|
|
if (self.TryGetComponent<LabelComponent>(paper, out var label) && label.CurrentLabel is { } labelText)
|
|
return labelText;
|
|
|
|
return self.GetComponent<MetaDataComponent>(paper).EntityName;
|
|
}
|
|
}
|
|
}
|