diff --git a/Content.Server/GameTicking/GameTicker.cs b/Content.Server/GameTicking/GameTicker.cs index d81bafeffa..764c65633a 100644 --- a/Content.Server/GameTicking/GameTicker.cs +++ b/Content.Server/GameTicking/GameTicker.cs @@ -583,7 +583,10 @@ namespace Content.Server.GameTicking var data = session.ContentData(); data.WipeMind(); - data.Mind = new Mind(session.SessionId); + data.Mind = new Mind(session.SessionId) + { + CharacterName = character.Name + }; if (jobId == null) { diff --git a/Content.Server/Mobs/Mind.cs b/Content.Server/Mobs/Mind.cs index 88b446928f..2b11bf8474 100644 --- a/Content.Server/Mobs/Mind.cs +++ b/Content.Server/Mobs/Mind.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Content.Server.GameObjects.Components.Mobs; using Content.Server.Players; @@ -48,6 +48,9 @@ namespace Content.Server.Mobs [ViewVariables] public IEntity CurrentEntity => VisitingEntity ?? OwnedEntity; + [ViewVariables(VVAccess.ReadWrite)] + public string CharacterName { get; set; } + /// /// The component currently owned by this mind. /// Can be null. diff --git a/Content.Server/Observer/Ghost.cs b/Content.Server/Observer/Ghost.cs index 12696ef85d..31a1d42bd3 100644 --- a/Content.Server/Observer/Ghost.cs +++ b/Content.Server/Observer/Ghost.cs @@ -63,7 +63,8 @@ namespace Content.Server.Observer var entityManager = IoCManager.Resolve(); var ghost = entityManager.SpawnEntity("MobObserver", position); - ghost.Name = name; + ghost.Name = mind.CharacterName; + var ghostComponent = ghost.GetComponent(); ghostComponent.CanReturnToBody = canReturn;