Remove some obsolete AppearanceComponent method usages (#13726)
This commit is contained in:
@@ -9,6 +9,7 @@ namespace Content.Shared.Nutrition.EntitySystems
|
||||
public abstract class SharedCreamPieSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private SharedStunSystem _stunSystem = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -41,7 +42,7 @@ namespace Content.Shared.Nutrition.EntitySystems
|
||||
|
||||
if (EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
|
||||
{
|
||||
appearance.SetData(CreamPiedVisuals.Creamed, value);
|
||||
_appearance.SetData(uid, CreamPiedVisuals.Creamed, value, appearance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Content.Shared.PDA
|
||||
public abstract class SharedPDASystem : EntitySystem
|
||||
{
|
||||
[Dependency] protected readonly ItemSlotsSystem ItemSlotsSystem = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -27,7 +28,7 @@ namespace Content.Shared.PDA
|
||||
ItemSlotsSystem.AddItemSlot(uid, PDAComponent.PDAIdSlotId, pda.IdSlot);
|
||||
ItemSlotsSystem.AddItemSlot(uid, PDAComponent.PDAPenSlotId, pda.PenSlot);
|
||||
|
||||
UpdatePDAAppearance(pda);
|
||||
UpdatePdaAppearance(uid, pda);
|
||||
}
|
||||
|
||||
private void OnComponentRemove(EntityUid uid, PDAComponent pda, ComponentRemove args)
|
||||
@@ -41,7 +42,7 @@ namespace Content.Shared.PDA
|
||||
if (args.Container.ID == PDAComponent.PDAIdSlotId)
|
||||
pda.ContainedID = CompOrNull<IdCardComponent>(args.Entity);
|
||||
|
||||
UpdatePDAAppearance(pda);
|
||||
UpdatePdaAppearance(uid, pda);
|
||||
}
|
||||
|
||||
protected virtual void OnItemRemoved(EntityUid uid, PDAComponent pda, EntRemovedFromContainerMessage args)
|
||||
@@ -49,13 +50,13 @@ namespace Content.Shared.PDA
|
||||
if (args.Container.ID == pda.IdSlot.ID)
|
||||
pda.ContainedID = null;
|
||||
|
||||
UpdatePDAAppearance(pda);
|
||||
UpdatePdaAppearance(uid, pda);
|
||||
}
|
||||
|
||||
private void UpdatePDAAppearance(PDAComponent pda)
|
||||
private void UpdatePdaAppearance(EntityUid uid, PDAComponent pda)
|
||||
{
|
||||
if (TryComp(pda.Owner, out AppearanceComponent ? appearance))
|
||||
appearance.SetData(PDAVisuals.IDCardInserted, pda.ContainedID != null);
|
||||
_appearance.SetData(uid, PDAVisuals.IDCardInserted, pda.ContainedID != null, appearance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Content.Shared.Payload.EntitySystems;
|
||||
public sealed class ChemicalPayloadSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly ItemSlotsSystem _itemSlotsSystem = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -36,7 +37,7 @@ public sealed class ChemicalPayloadSystem : EntitySystem
|
||||
if (component.BeakerSlotB.HasItem)
|
||||
filled |= ChemicalPayloadFilledSlots.Right;
|
||||
|
||||
appearance.SetData(ChemicalPayloadVisuals.Slots, filled);
|
||||
_appearance.SetData(uid, ChemicalPayloadVisuals.Slots, filled, appearance);
|
||||
}
|
||||
|
||||
private void OnComponentInit(EntityUid uid, ChemicalPayloadComponent payload, ComponentInit args)
|
||||
|
||||
Reference in New Issue
Block a user