Inline Name

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 15:25:51 +01:00
parent 61be228ad0
commit ee4ff9cfe8
97 changed files with 237 additions and 177 deletions

View File

@@ -50,15 +50,15 @@ namespace Content.Server.Administration.Commands
{
// TODO: Remove duplication between all this and "GamePreset.OnGhostAttempt()"...
if(!string.IsNullOrWhiteSpace(mind.CharacterName))
ghost.Name = mind.CharacterName;
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(ghost.Uid).EntityName = mind.CharacterName;
else if (!string.IsNullOrWhiteSpace(mind.Session?.Name))
ghost.Name = mind.Session.Name;
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(ghost.Uid).EntityName = mind.Session.Name;
mind.Visit(ghost);
}
else
{
ghost.Name = player.Name;
IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(ghost.Uid).EntityName = player.Name;
mind.TransferTo(ghost.Uid);
}