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

@@ -2,12 +2,14 @@ using Content.Server.MachineLinking.Components;
using Content.Shared.Interaction;
using Content.Shared.MachineLinking;
using Content.Shared.Verbs;
using Robust.Server.GameObjects;
namespace Content.Server.MachineLinking.System
{
public sealed class TwoWayLeverSystem : EntitySystem
{
[Dependency] private readonly SignalLinkerSystem _signalSystem = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
const string _leftToggleImage = "rotate_ccw.svg.192dpi.png";
const string _rightToggleImage = "rotate_cw.svg.192dpi.png";
@@ -96,8 +98,8 @@ namespace Content.Server.MachineLinking.System
if (component.State == TwoWayLeverState.Middle)
component.NextSignalLeft = !component.NextSignalLeft;
if (TryComp(uid, out AppearanceComponent? appearanceComponent))
appearanceComponent.SetData(TwoWayLeverVisuals.State, component.State);
if (TryComp(uid, out AppearanceComponent? appearance))
_appearance.SetData(uid, TwoWayLeverVisuals.State, component.State, appearance);
var port = component.State switch
{