Skip to content

Commit

Permalink
Fix electrocution displaying real name of disguised players (space-wi…
Browse files Browse the repository at this point in the history
  • Loading branch information
kacper724 authored Sep 29, 2023
1 parent 1dc1c8f commit 4313a6e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Content.Server/Electrocution/ElectrocutionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
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;
Expand Down Expand Up @@ -432,17 +433,18 @@ private bool DoCommonElectrocution(EntityUid uid, EntityUid? sourceUid,

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;
Expand Down

0 comments on commit 4313a6e

Please sign in to comment.