using System.Diagnostics.CodeAnalysis;
using Content.Shared.Actions.Events;
+using Content.Shared.IdentityManagement;
using Content.Shared.Interaction.Events;
using Content.Shared.Verbs;
using Robust.Shared.Serialization;
/*
* Added when an entity is inserted into a StationAiCore.
*/
+
+ //TODO: Fix this, please
+ private const string JobNameLocId = "job-name-station-ai";
private void InitializeHeld()
{
SubscribeLocalEvent<StationAiHeldComponent, InteractionAttemptEvent>(OnHeldInteraction);
SubscribeLocalEvent<StationAiHeldComponent, AttemptRelayActionComponentChangeEvent>(OnHeldRelay);
SubscribeLocalEvent<StationAiHeldComponent, JumpToCoreEvent>(OnCoreJump);
+ SubscribeLocalEvent<TryGetIdentityShortInfoEvent>(OnTryGetIdentityShortInfo);
+ }
+
+ private void OnTryGetIdentityShortInfo(TryGetIdentityShortInfoEvent args)
+ {
+ if (args.Handled)
+ {
+ return;
+ }
+
+ if (!HasComp<StationAiHeldComponent>(args.ForActor))
+ {
+ return;
+ }
+ args.Title = $"{Name(args.ForActor)} ({Loc.GetString(JobNameLocId)})";
+ args.Handled = true;
}
private void OnCoreJump(Entity<StationAiHeldComponent> ent, ref JumpToCoreEvent args)