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

@@ -9,6 +9,7 @@ public sealed class RandomMetadataSystem : EntitySystem
{
[Dependency] private readonly IPrototypeManager _prototype = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
public override void Initialize()
{
@@ -24,12 +25,13 @@ public sealed class RandomMetadataSystem : EntitySystem
if (component.NameSegments != null)
{
meta.EntityName = GetRandomFromSegments(component.NameSegments, component.NameSeparator);
_metaData.SetEntityName(uid, GetRandomFromSegments(component.NameSegments, component.NameSeparator), meta);
}
if (component.DescriptionSegments != null)
{
meta.EntityDescription = GetRandomFromSegments(component.DescriptionSegments, component.DescriptionSeparator);
_metaData.SetEntityDescription(uid,
GetRandomFromSegments(component.DescriptionSegments, component.DescriptionSeparator), meta);
}
}