Remove usages of obsolete MetaDataComponent setters (#19582)

This commit is contained in:
Visne
2023-08-28 11:20:31 +02:00
committed by GitHub
parent 38c6b4d07a
commit b88c2cbb49
32 changed files with 86 additions and 65 deletions

View File

@@ -263,11 +263,10 @@ namespace Content.Server.GameTicking
// Try setting the ghost entity name to either the character name or the player name.
// If all else fails, it'll default to the default entity prototype name, "observer".
// However, that should rarely happen.
var meta = MetaData(ghost);
if(!string.IsNullOrWhiteSpace(mind.CharacterName))
meta.EntityName = mind.CharacterName;
if (!string.IsNullOrWhiteSpace(mind.CharacterName))
_metaData.SetEntityName(ghost, mind.CharacterName);
else if (!string.IsNullOrWhiteSpace(mind.Session?.Name))
meta.EntityName = mind.Session.Name;
_metaData.SetEntityName(ghost, mind.Session.Name);
var ghostComponent = Comp<GhostComponent>(ghost);