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

@@ -28,6 +28,7 @@ public sealed partial class BotanySystem : EntitySystem
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly IRobustRandom _robustRandom = default!;
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly MetaDataSystem _metaData = default!;
public override void Initialize()
{
@@ -102,7 +103,7 @@ public sealed partial class BotanySystem : EntitySystem
var name = Loc.GetString(proto.Name);
var noun = Loc.GetString(proto.Noun);
var val = Loc.GetString("botany-seed-packet-name", ("seedName", name), ("seedNoun", noun));
MetaData(seed).EntityName = val;
_metaData.SetEntityName(seed, val);
// try to automatically place in user's other hand
_hands.TryPickupAnyHand(user, seed);
@@ -167,8 +168,9 @@ public sealed partial class BotanySystem : EntitySystem
if (proto.Mysterious)
{
var metaData = MetaData(entity);
metaData.EntityName += "?";
metaData.EntityDescription += " " + Loc.GetString("botany-mysterious-description-addon");
_metaData.SetEntityName(entity, metaData.EntityName + "?", metaData);
_metaData.SetEntityDescription(entity,
metaData.EntityDescription + " " + Loc.GetString("botany-mysterious-description-addon"), metaData);
}
if (proto.Bioluminescent)