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

@@ -43,6 +43,7 @@ namespace Content.Server.Polymorph.Systems
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
private ISawmill _sawmill = default!;
@@ -220,12 +221,8 @@ namespace Content.Server.Polymorph.Systems
}
}
if (proto.TransferName &&
TryComp<MetaDataComponent>(uid, out var targetMeta) &&
TryComp<MetaDataComponent>(child, out var childMeta))
{
childMeta.EntityName = targetMeta.EntityName;
}
if (proto.TransferName && TryComp<MetaDataComponent>(uid, out var targetMeta))
_metaData.SetEntityName(child, targetMeta.EntityName);
if (proto.TransferHumanoidAppearance)
{