Store original character name in mind.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
|
||||
/// <summary>
|
||||
/// The component currently owned by this mind.
|
||||
/// Can be null.
|
||||
|
||||
@@ -63,7 +63,8 @@ namespace Content.Server.Observer
|
||||
|
||||
var entityManager = IoCManager.Resolve<IEntityManager>();
|
||||
var ghost = entityManager.SpawnEntity("MobObserver", position);
|
||||
ghost.Name = name;
|
||||
ghost.Name = mind.CharacterName;
|
||||
|
||||
var ghostComponent = ghost.GetComponent<GhostComponent>();
|
||||
ghostComponent.CanReturnToBody = canReturn;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user