]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Make the Borgs Names Appear When they Make an Announcement (#30107)
authorCojoke <83733158+Cojoke-dot@users.noreply.github.com>
Tue, 13 Aug 2024 18:31:33 +0000 (13:31 -0500)
committerGitHub <noreply@github.com>
Tue, 13 Aug 2024 18:31:33 +0000 (11:31 -0700)
* Make the Borgs Names Appear When they Make an Announcement

* bwomp

* re-order

* Use Name instead of metadata

* goiup

Content.Server/Communications/CommunicationsConsoleSystem.cs

index 7502c889e1ca5b4eeff070010a53196c0e246d35..e616949d7a1f4a86488c041c78f0de22ec91bf59 100644 (file)
@@ -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<BorgChassisComponent>(mob))
+                {
+                    author = Name(mob).Trim();
+                }
             }
 
             comp.AnnouncementCooldownRemaining = comp.Delay;