From 6d218f2ad50ac246fc10204151040f6d5e93ebdb Mon Sep 17 00:00:00 2001 From: themias <89101928+themias@users.noreply.github.com> Date: Wed, 15 Jan 2025 17:49:51 -0500 Subject: [PATCH] Fix DNA scrambler updating station record (#34091) * Fix DNA scrambler updating station record * Update Content.Server/Implants/SubdermalImplantSystem.cs --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> --- Content.Server/Implants/SubdermalImplantSystem.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Content.Server/Implants/SubdermalImplantSystem.cs b/Content.Server/Implants/SubdermalImplantSystem.cs index 0c86e2f659..9d074cec74 100644 --- a/Content.Server/Implants/SubdermalImplantSystem.cs +++ b/Content.Server/Implants/SubdermalImplantSystem.cs @@ -21,6 +21,7 @@ using Robust.Shared.Random; using System.Numerics; using Content.Shared.Movement.Pulling.Components; using Content.Shared.Movement.Pulling.Systems; +using Content.Server.IdentityManagement; using Content.Shared.Store.Components; using Robust.Shared.Collections; using Robust.Shared.Map.Components; @@ -41,6 +42,7 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem [Dependency] private readonly PullingSystem _pullingSystem = default!; [Dependency] private readonly EntityLookupSystem _lookupSystem = default!; [Dependency] private readonly SharedMapSystem _mapSystem = default!; + [Dependency] private readonly IdentitySystem _identity = default!; private EntityQuery _physicsQuery; private HashSet> _targetGrids = []; @@ -211,7 +213,7 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem { var newProfile = HumanoidCharacterProfile.RandomWithSpecies(humanoid.Species); _humanoidAppearance.LoadProfile(ent, newProfile, humanoid); - _metaData.SetEntityName(ent, newProfile.Name); + _metaData.SetEntityName(ent, newProfile.Name, raiseEvents: false); // raising events would update ID card, station record, etc. if (TryComp(ent, out var dna)) { dna.DNA = _forensicsSystem.GenerateDNA(); @@ -223,6 +225,7 @@ public sealed class SubdermalImplantSystem : SharedSubdermalImplantSystem { fingerprint.Fingerprint = _forensicsSystem.GenerateFingerprint(); } + _identity.QueueIdentityUpdate(ent); // manually queue identity update since we don't raise the event _popup.PopupEntity(Loc.GetString("scramble-implant-activated-popup"), ent, ent); } -- 2.51.2