Remove some obsolete AppearanceComponent method usages (#13726)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Explosion.Components;
|
||||
using Content.Shared.Physics;
|
||||
using Content.Shared.Trigger;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Physics.Events;
|
||||
@@ -10,6 +11,8 @@ namespace Content.Server.Explosion.EntitySystems;
|
||||
|
||||
public sealed partial class TriggerSystem
|
||||
{
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Anything that has stuff touching it (to check speed) or is on cooldown.
|
||||
/// </summary>
|
||||
@@ -86,9 +89,9 @@ public sealed partial class TriggerSystem
|
||||
|
||||
private void SetProximityAppearance(EntityUid uid, TriggerOnProximityComponent component)
|
||||
{
|
||||
if (EntityManager.TryGetComponent(uid, out AppearanceComponent? appearanceComponent))
|
||||
if (EntityManager.TryGetComponent(uid, out AppearanceComponent? appearance))
|
||||
{
|
||||
appearanceComponent.SetData(ProximityTriggerVisualState.State, component.Enabled ? ProximityTriggerVisuals.Inactive : ProximityTriggerVisuals.Off);
|
||||
_appearance.SetData(uid, ProximityTriggerVisualState.State, component.Enabled ? ProximityTriggerVisuals.Inactive : ProximityTriggerVisuals.Off, appearance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,9 +110,9 @@ public sealed partial class TriggerSystem
|
||||
component.Accumulator += component.Cooldown;
|
||||
}
|
||||
|
||||
if (EntityManager.TryGetComponent(component.Owner, out AppearanceComponent? appearanceComponent))
|
||||
if (EntityManager.TryGetComponent(component.Owner, out AppearanceComponent? appearance))
|
||||
{
|
||||
appearanceComponent.SetData(ProximityTriggerVisualState.State, ProximityTriggerVisuals.Active);
|
||||
_appearance.SetData(appearance.Owner, ProximityTriggerVisualState.State, ProximityTriggerVisuals.Active, appearance);
|
||||
}
|
||||
|
||||
Trigger(component.Owner);
|
||||
|
||||
Reference in New Issue
Block a user