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

@@ -10,6 +10,7 @@ namespace Content.Server.BarSign.Systems
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
public override void Initialize()
{
@@ -36,8 +37,8 @@ namespace Content.Server.BarSign.Systems
var meta = Comp<MetaDataComponent>(uid);
var name = newPrototype.Name != string.Empty ? newPrototype.Name : "barsign-component-name";
meta.EntityName = Loc.GetString(name);
meta.EntityDescription = Loc.GetString(newPrototype.Description);
_metaData.SetEntityName(uid, Loc.GetString(name), meta);
_metaData.SetEntityDescription(uid, Loc.GetString(newPrototype.Description), meta);
component.CurrentSign = newPrototype.ID;
Dirty(component);