From: Cojoke <83733158+Cojoke-dot@users.noreply.github.com> Date: Tue, 13 Aug 2024 18:31:33 +0000 (-0500) Subject: Make the Borgs Names Appear When they Make an Announcement (#30107) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=5d6baea7d339ac145bcebc1085530474f20e3dae;p=space-station-14.git Make the Borgs Names Appear When they Make an Announcement (#30107) * Make the Borgs Names Appear When they Make an Announcement * bwomp * re-order * Use Name instead of metadata * goiup --- diff --git a/Content.Server/Communications/CommunicationsConsoleSystem.cs b/Content.Server/Communications/CommunicationsConsoleSystem.cs index 7502c889e1..e616949d7a 100644 --- a/Content.Server/Communications/CommunicationsConsoleSystem.cs +++ b/Content.Server/Communications/CommunicationsConsoleSystem.cs @@ -22,6 +22,7 @@ using Content.Shared.Database; using Content.Shared.DeviceNetwork; using Content.Shared.Emag.Components; using Content.Shared.Popups; +using Content.Shared.Silicons.Borgs.Components; using Robust.Server.GameObjects; using Robust.Shared.Configuration; @@ -255,10 +256,17 @@ namespace Content.Server.Communications return; } + // User has an id if (_idCardSystem.TryFindIdCard(mob, out var id)) { author = $"{id.Comp.FullName} ({CultureInfo.CurrentCulture.TextInfo.ToTitleCase(id.Comp.JobTitle ?? string.Empty)})".Trim(); } + + // User does not have an id and is a borg, so use the borg's name + if (HasComp(mob)) + { + author = Name(mob).Trim(); + } } comp.AnnouncementCooldownRemaining = comp.Delay;