Show paradox clones in deadchat (#35940)

show clones in deadchat
This commit is contained in:
slarticodefast
2025-03-26 16:30:14 +01:00
committed by GitHub
parent 6d63e3c1f4
commit 9ff43f344e
6 changed files with 100 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Content.Shared.Movement.Events;
using Content.Shared.Movement.Systems;
using Content.Shared.NameModifier.EntitySystems;
using Content.Shared.Popups;
using Content.Shared.Storage.Components;
using Content.Shared.Tag;
@@ -66,6 +67,7 @@ namespace Content.Server.Ghost
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly TagSystem _tag = default!;
[Dependency] private readonly NameModifierSystem _nameMod = default!;
private EntityQuery<GhostComponent> _ghostQuery;
private EntityQuery<PhysicsComponent> _physicsQuery;
@@ -495,6 +497,10 @@ namespace Content.Server.Ghost
else
_minds.TransferTo(mind.Owner, ghost, mind: mind.Comp);
Log.Debug($"Spawned ghost \"{ToPrettyString(ghost)}\" for {mind.Comp.CharacterName}.");
// we changed the entity name above
// we have to call this after the mind has been transferred since some mind roles modify the ghost's name
_nameMod.RefreshNameModifiers(ghost);
return ghost;
}