]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix electrocution displaying real name of disguised players (#20603)
authorKacper Urbańczyk <kacperjaroslawurbanczyk@gmail.com>
Fri, 29 Sep 2023 15:01:19 +0000 (17:01 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Sep 2023 15:01:19 +0000 (08:01 -0700)
Content.Server/Electrocution/ElectrocutionSystem.cs

index 63517c9962eeecf2ddeed8420977da15e77a9f35..844d526c58e10526ae3af563d36ac10d370bb2ba 100644 (file)
@@ -12,6 +12,7 @@ using Content.Shared.Damage;
 using Content.Shared.Damage.Prototypes;
 using Content.Shared.Database;
 using Content.Shared.Electrocution;
+using Content.Shared.IdentityManagement;
 using Content.Shared.Interaction;
 using Content.Shared.Inventory;
 using Content.Shared.Jittering;
@@ -432,17 +433,18 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
 
         var filter = Filter.PvsExcept(uid, entityManager: EntityManager);
 
+        var identifiedUid = Identity.Entity(uid, ent: EntityManager);
         // TODO: Allow being able to pass EntityUid to Loc...
         if (sourceUid != null)
         {
             _popup.PopupEntity(Loc.GetString("electrocuted-component-mob-shocked-by-source-popup-others",
-                ("mob", uid), ("source", (sourceUid.Value))), uid, filter, true);
+                ("mob", identifiedUid), ("source", (sourceUid.Value))), uid, filter, true);
             PlayElectrocutionSound(uid, sourceUid.Value);
         }
         else
         {
             _popup.PopupEntity(Loc.GetString("electrocuted-component-mob-shocked-popup-others",
-                ("mob", uid)), uid, filter, true);
+                ("mob", identifiedUid)), uid, filter, true);
         }
 
         return true;