Remove some obsolete AppearanceComponent method usages (#13726)

This commit is contained in:
Visne
2023-02-02 17:34:53 +01:00
committed by GitHub
parent 23b90de34d
commit 5a5a3afbb1
111 changed files with 428 additions and 349 deletions

View File

@@ -4,6 +4,7 @@ using Content.Shared.Containers.ItemSlots;
using Content.Shared.Examine;
using Content.Shared.Labels;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Shared.Containers;
using Robust.Shared.Utility;
@@ -16,6 +17,7 @@ namespace Content.Server.Labels
public sealed class LabelSystem : EntitySystem
{
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
public const string ContainerName = "paper_label";
@@ -71,7 +73,7 @@ namespace Content.Server.Labels
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
return;
appearance.SetData(PaperLabelVisuals.HasLabel, false);
_appearance.SetData(uid, PaperLabelVisuals.HasLabel, false, appearance);
}
private void OnComponentRemove(EntityUid uid, PaperLabelComponent component, ComponentRemove args)
@@ -128,7 +130,7 @@ namespace Content.Server.Labels
if (!EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
return;
appearance.SetData(PaperLabelVisuals.HasLabel, label.LabelSlot.HasItem);
_appearance.SetData(uid, PaperLabelVisuals.HasLabel, label.LabelSlot.HasItem, appearance);
}
}
}